From b32fa42afaec65e82be2334cf9fb3f55da6671cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 16 Oct 2023 17:52:25 +0200 Subject: [PATCH] DX: fix test on AccompanyingCourseExportHelperTest.php --- .../Export/AccompanyingCourseExportHelperTest.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Tests/Export/AccompanyingCourseExportHelperTest.php b/src/Bundle/ChillMainBundle/Tests/Export/AccompanyingCourseExportHelperTest.php index 62af515ec..7fbebbe9d 100644 --- a/src/Bundle/ChillMainBundle/Tests/Export/AccompanyingCourseExportHelperTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Export/AccompanyingCourseExportHelperTest.php @@ -33,13 +33,10 @@ class AccompanyingCourseExportHelperTest extends KernelTestCase private EntityManagerInterface $em; - private AccompanyingCourseExportHelper $accompanyingCourseExportHelper; - protected function setUp(): void { self::bootKernel(); $this->em = self::$container->get(EntityManagerInterface::class); - $this->accompanyingCourseExportHelper = self::$container->get(AccompanyingCourseExportHelper::class); } public static function tearDownAfterClass(): void @@ -63,7 +60,7 @@ class AccompanyingCourseExportHelperTest extends KernelTestCase [$periodA, $periodB, $periodC] = $this->prepareData(); $qb = $this->em->getRepository(AccompanyingPeriod::class)->createQueryBuilder('acp'); - $this->accompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); + AccompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); $qb->select('acp.id'); @@ -105,13 +102,12 @@ class AccompanyingCourseExportHelperTest extends KernelTestCase $this->em->persist($periodB); $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, $periodB]; 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->clear();