From 50803cc8f6fa82dd63768ee8c76ab278f2955939 Mon Sep 17 00:00:00 2001 From: Florian PARRENO Date: Wed, 17 Jul 2024 09:41:57 +0200 Subject: [PATCH] Fix tests --- .../Functional/Command/GenerateCronFileCommandTest.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Tests/Functional/Command/GenerateCronFileCommandTest.php b/Tests/Functional/Command/GenerateCronFileCommandTest.php index 474b2d3..603f783 100644 --- a/Tests/Functional/Command/GenerateCronFileCommandTest.php +++ b/Tests/Functional/Command/GenerateCronFileCommandTest.php @@ -17,12 +17,11 @@ public function testGenerateFullConfiguration() $this->assertSame(0, $tester->execute(['env-mode' => 'staging'])); - $expected = '* * * * * project_staging php7.3 path/to/staging app:test'; + $expected = '* * * * * project_staging APP_ENV=staging php7.3 path/to/staging app:test'; $cacheDir = $kernel->getContainer()->getParameter('kernel.cache_dir').'/cron_test'; - $this->assertStringContainsString($expected, $content = file_get_contents($cacheDir)); - $this->assertStringContainsString('APP_ENV=staging', $content); + $this->assertStringContainsString($expected, file_get_contents($cacheDir)); } public function testGenerateEmptyCrons() @@ -53,10 +52,9 @@ public function testDryRun() $this->assertStringContainsString('[OK] Dry run generated', $tester->getDisplay()); $this->assertStringContainsString('# send email', $tester->getDisplay()); $this->assertStringContainsString( - '* * * * * project_staging php7.3 path/to/staging app:test', - $display = $tester->getDisplay() + '* * * * * project_staging APP_ENV=staging php7.3 path/to/staging app:test', + $tester->getDisplay() ); - $this->assertStringContainsString('APP_ENV=staging', $display); } public function testCheckExecutivePath()