mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
Controller action to move members of an household
This commit is contained in:
@@ -37,10 +37,10 @@ class MembersEditorTest extends TestCase
|
||||
$person,
|
||||
$position);
|
||||
|
||||
$this->assertInstanceOf(Collection::class, $person->getHouseholdParticipations());
|
||||
$this->assertEquals(1, $person->getHouseholdParticipations()->count());
|
||||
$persistables = $editor->getPersistable();
|
||||
$this->assertEquals(\count($persistables), 1);
|
||||
|
||||
$membership1 = $person->getHouseholdParticipations()->first();
|
||||
$membership1 = $persistables[0];
|
||||
$this->assertSame($household1, $membership1->getHousehold());
|
||||
$this->assertNull($membership1->getEndDate());
|
||||
|
||||
@@ -52,9 +52,10 @@ class MembersEditorTest extends TestCase
|
||||
$person,
|
||||
$position);
|
||||
|
||||
$this->assertEquals(2, $person->getHouseholdParticipations()->count());
|
||||
$persistables = $editor->getPersistable();
|
||||
$this->assertEquals(1, count($persistables));
|
||||
|
||||
$membership2 = $person->getHouseholdParticipations()->last();
|
||||
$membership2 = $persistables[0];
|
||||
$this->assertSame($household2, $membership2->getHousehold());
|
||||
$this->assertNull($membership2->getEndDate());
|
||||
$this->assertNotNull($membership1->getEndDate(),
|
||||
@@ -77,8 +78,8 @@ class MembersEditorTest extends TestCase
|
||||
$person,
|
||||
$position);
|
||||
|
||||
$this->assertInstanceOf(Collection::class, $person->getHouseholdParticipations());
|
||||
$this->assertEquals(1, $person->getHouseholdParticipations()->count());
|
||||
$persistables = $editor->getPersistable();
|
||||
$this->assertEquals(1, count($persistables));
|
||||
|
||||
$membership1 = $person->getHouseholdParticipations()->first();
|
||||
$this->assertSame($household1, $membership1->getHousehold());
|
||||
@@ -92,7 +93,8 @@ class MembersEditorTest extends TestCase
|
||||
$person,
|
||||
$position);
|
||||
|
||||
$this->assertEquals(2, $person->getHouseholdParticipations()->count());
|
||||
$persistables = $editor->getPersistable();
|
||||
$this->assertEquals(1, count($persistables));
|
||||
|
||||
$membership2 = $person->getHouseholdParticipations()->last();
|
||||
$this->assertNull($membership2->getEndDate());
|
||||
|
Reference in New Issue
Block a user