mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
DX: fix test on AccompanyingCourseExportHelperTest.php
This commit is contained in:
parent
be8975ee04
commit
b32fa42afa
@ -33,13 +33,10 @@ class AccompanyingCourseExportHelperTest extends KernelTestCase
|
|||||||
|
|
||||||
private EntityManagerInterface $em;
|
private EntityManagerInterface $em;
|
||||||
|
|
||||||
private AccompanyingCourseExportHelper $accompanyingCourseExportHelper;
|
|
||||||
|
|
||||||
protected function setUp(): void
|
protected function setUp(): void
|
||||||
{
|
{
|
||||||
self::bootKernel();
|
self::bootKernel();
|
||||||
$this->em = self::$container->get(EntityManagerInterface::class);
|
$this->em = self::$container->get(EntityManagerInterface::class);
|
||||||
$this->accompanyingCourseExportHelper = self::$container->get(AccompanyingCourseExportHelper::class);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function tearDownAfterClass(): void
|
public static function tearDownAfterClass(): void
|
||||||
@ -63,7 +60,7 @@ class AccompanyingCourseExportHelperTest extends KernelTestCase
|
|||||||
[$periodA, $periodB, $periodC] = $this->prepareData();
|
[$periodA, $periodB, $periodC] = $this->prepareData();
|
||||||
|
|
||||||
$qb = $this->em->getRepository(AccompanyingPeriod::class)->createQueryBuilder('acp');
|
$qb = $this->em->getRepository(AccompanyingPeriod::class)->createQueryBuilder('acp');
|
||||||
$this->accompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb);
|
AccompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb);
|
||||||
|
|
||||||
$qb->select('acp.id');
|
$qb->select('acp.id');
|
||||||
|
|
||||||
@ -105,13 +102,12 @@ class AccompanyingCourseExportHelperTest extends KernelTestCase
|
|||||||
$this->em->persist($periodB);
|
$this->em->persist($periodB);
|
||||||
$this->em->persist($periodC);
|
$this->em->persist($periodC);
|
||||||
|
|
||||||
self::$entitiesToDelete[] = [ClosingMotive::class, $cmChild];
|
|
||||||
self::$entitiesToDelete[] = [ClosingMotive::class, $cmA];
|
|
||||||
self::$entitiesToDelete[] = [ClosingMotive::class, $cmB];
|
|
||||||
|
|
||||||
self::$entitiesToDelete[] = [AccompanyingPeriod::class, $periodA];
|
self::$entitiesToDelete[] = [AccompanyingPeriod::class, $periodA];
|
||||||
self::$entitiesToDelete[] = [AccompanyingPeriod::class, $periodB];
|
self::$entitiesToDelete[] = [AccompanyingPeriod::class, $periodB];
|
||||||
self::$entitiesToDelete[] = [AccompanyingPeriod::class, $periodC];
|
self::$entitiesToDelete[] = [AccompanyingPeriod::class, $periodC];
|
||||||
|
self::$entitiesToDelete[] = [ClosingMotive::class, $cmChild];
|
||||||
|
self::$entitiesToDelete[] = [ClosingMotive::class, $cmA];
|
||||||
|
self::$entitiesToDelete[] = [ClosingMotive::class, $cmB];
|
||||||
|
|
||||||
$this->em->flush();
|
$this->em->flush();
|
||||||
$this->em->clear();
|
$this->em->clear();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user