diff --git a/src/Bundle/ChillMainBundle/Tests/Cron/CronJobDatabaseInteractionTest.php b/src/Bundle/ChillMainBundle/Tests/Cron/CronJobDatabaseInteractionTest.php index 0b80730fe..3dc6fd66c 100644 --- a/src/Bundle/ChillMainBundle/Tests/Cron/CronJobDatabaseInteractionTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Cron/CronJobDatabaseInteractionTest.php @@ -40,6 +40,17 @@ class CronJobDatabaseInteractionTest extends KernelTestCase $this->cronJobExecutionRepository = self::$container->get(CronJobExecutionRepository::class); } + public static function tearDownAfterClass(): void + { + self::bootKernel(); + + $entityManager = self::$container->get(EntityManagerInterface::class); + + $entityManager->createQuery("DELETE " . CronJobExecution::class . ' cje WHERE cje.key LIKE :key') + ->setParameter('key', 'test-with-data') + ->execute(); + } + public function testCompleteLifeCycle(): void { $cronjob = $this->prophesize(CronJobInterface::class);