Skip to content

Commit 22b4f8e

Browse files
committed
test: add failing test case for proxy and association
1 parent edf287e commit 22b4f8e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/Integration/ORM/ProxyEntityFactoryRelationshipTestCase.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,16 @@ public function cannot_use_assert_persisted_when_entity_has_changes(): void
134134
$this->expectException(RefreshObjectFailed::class);
135135
$contact->_assertPersisted();
136136
}
137+
138+
/**
139+
* @test
140+
*/
141+
public function can_add_and_save_association(): void
142+
{
143+
$category = $this->categoryFactory()->create();
144+
145+
$contact = $this->contactFactory()->withoutPersisting()->create();
146+
$category->addContact($contact->_real());
147+
$category->_save();
148+
}
137149
}

0 commit comments

Comments
 (0)