diff --git a/tests/Integration/ORM/ProxyEntityFactoryRelationshipTestCase.php b/tests/Integration/ORM/ProxyEntityFactoryRelationshipTestCase.php index 400d777b..2486ecf8 100644 --- a/tests/Integration/ORM/ProxyEntityFactoryRelationshipTestCase.php +++ b/tests/Integration/ORM/ProxyEntityFactoryRelationshipTestCase.php @@ -134,4 +134,16 @@ public function cannot_use_assert_persisted_when_entity_has_changes(): void $this->expectException(RefreshObjectFailed::class); $contact->_assertPersisted(); } + + /** + * @test + */ + public function can_add_and_save_association(): void + { + $category = $this->categoryFactory()->create(); + + $contact = $this->contactFactory()->withoutPersisting()->create(); + $category->addContact($contact->_real()); + $category->_save(); + } }