mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
make test easier to read
This commit is contained in:
parent
0c5b35926b
commit
b0a7612329
@ -62,8 +62,8 @@ class AccompanyingCourseExportHelperTest extends KernelTestCase
|
|||||||
* @dataProvider dataProviderExclusionOnClosingMotive
|
* @dataProvider dataProviderExclusionOnClosingMotive
|
||||||
*/
|
*/
|
||||||
public function testExclusionOnClosingMotive(
|
public function testExclusionOnClosingMotive(
|
||||||
AccompanyingPeriod $periodA, //canceled
|
AccompanyingPeriod $periodA, //not canceled
|
||||||
AccompanyingPeriod $periodB, // not canceled
|
AccompanyingPeriod $periodB, // canceled
|
||||||
AccompanyingPeriod $periodC // canceled (child cm of canceled cm)
|
AccompanyingPeriod $periodC // canceled (child cm of canceled cm)
|
||||||
): void {
|
): void {
|
||||||
$qb = $this->em->getRepository(AccompanyingPeriod::class)->createQueryBuilder('acp');
|
$qb = $this->em->getRepository(AccompanyingPeriod::class)->createQueryBuilder('acp');
|
||||||
@ -77,8 +77,8 @@ class AccompanyingCourseExportHelperTest extends KernelTestCase
|
|||||||
$periodB = $this->em->find(AccompanyingPeriod::class, $periodB->getId());
|
$periodB = $this->em->find(AccompanyingPeriod::class, $periodB->getId());
|
||||||
$periodC = $this->em->find(AccompanyingPeriod::class, $periodC->getId());
|
$periodC = $this->em->find(AccompanyingPeriod::class, $periodC->getId());
|
||||||
|
|
||||||
self::assertContains($periodB->getId(), $periodIdsFound, 'Period without canceled closing motive has been found');
|
self::assertContains($periodA->getId(), $periodIdsFound, 'Period without canceled closing motive has been found');
|
||||||
self::assertNotContains($periodA->getdId(), $periodIdsFound, 'Period with canceled closing motive has not been found');
|
self::assertNotContains($periodB->getdId(), $periodIdsFound, 'Period with canceled closing motive has not been found');
|
||||||
self::assertNotContains($periodC->getId(), $periodIdsFound, 'Period with child canceled closing motive has not been found');
|
self::assertNotContains($periodC->getId(), $periodIdsFound, 'Period with child canceled closing motive has not been found');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,13 +87,13 @@ class AccompanyingCourseExportHelperTest extends KernelTestCase
|
|||||||
$this->setUp();
|
$this->setUp();
|
||||||
|
|
||||||
$cmA = new ClosingMotive();
|
$cmA = new ClosingMotive();
|
||||||
$cmA->setIsCanceledAccompanyingPeriod(true);
|
$cmA->setIsCanceledAccompanyingPeriod(false);
|
||||||
|
|
||||||
$cmB = new ClosingMotive();
|
$cmB = new ClosingMotive();
|
||||||
$cmB->setIsCanceledAccompanyingPeriod(false);
|
$cmB->setIsCanceledAccompanyingPeriod(true);
|
||||||
|
|
||||||
$cmChild = new ClosingMotive();
|
$cmChild = new ClosingMotive();
|
||||||
$cmChild->setParent($cmA);
|
$cmChild->setParent($cmB);
|
||||||
|
|
||||||
$this->em->persist($cmA);
|
$this->em->persist($cmA);
|
||||||
$this->em->persist($cmB);
|
$this->em->persist($cmB);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user