mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 23:23:51 +00:00
[test] add dataprovider for testing move person where both are participating in the same parcours
This commit is contained in:
@@ -5,6 +5,8 @@ namespace Action\Remove;
|
||||
use Chill\ActivityBundle\Entity\Activity;
|
||||
use Chill\PersonBundle\Actions\Remove\PersonMove;
|
||||
use Chill\PersonBundle\Actions\Remove\PersonMoveManager;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation;
|
||||
use Chill\PersonBundle\Entity\Household\Household;
|
||||
use Chill\PersonBundle\Entity\Household\HouseholdMember;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
@@ -132,6 +134,23 @@ class PersonMoveTest extends KernelTestCase
|
||||
|
||||
yield [$personA, $personB, "move 2 people having the same household at the same time"];
|
||||
|
||||
$personA = new Person();
|
||||
$personB = new Person();
|
||||
$parcours = new AccompanyingPeriod();
|
||||
|
||||
$parcours->addPerson($personA);
|
||||
$parcours->addPerson($personB);
|
||||
|
||||
$this->em->persist($personA);
|
||||
$this->em->persist($personB);
|
||||
$this->em->persist($parcours);
|
||||
|
||||
self::$entitiesToDelete[] = [Person::class, $personA];
|
||||
self::$entitiesToDelete[] = [Person::class, $personB];
|
||||
self::$entitiesToDelete[] = [AccompanyingPeriod::class, $parcours];
|
||||
|
||||
yield [$personA, $personB, "move 2 people participating to the same parcours"];
|
||||
|
||||
$this->em->flush();
|
||||
$this->em->clear();
|
||||
}
|
||||
|
Reference in New Issue
Block a user