Skip to content

Commit a2571bb

Browse files
committed
Update tests to check for APP_ENV
1 parent 4168320 commit a2571bb

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Tests/Functional/Command/GenerateCronFileCommandTest.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ public function testGenerateFullConfiguration()
1717

1818
$this->assertSame(0, $tester->execute(['env-mode' => 'staging']));
1919

20-
$expected = '* * * * * project_staging php7.3 path/to/staging app:test --env=staging';
20+
$expected = '* * * * * project_staging php7.3 path/to/staging app:test';
2121

2222
$cacheDir = $kernel->getContainer()->getParameter('kernel.cache_dir').'/cron_test';
2323

24-
$this->assertStringContainsString($expected, file_get_contents($cacheDir));
24+
$this->assertStringContainsString($expected, $content = file_get_contents($cacheDir));
25+
$this->assertStringContainsString('APP_ENV=staging', $content);
2526
}
2627

2728
public function testGenerateEmptyCrons()
@@ -52,9 +53,10 @@ public function testDryRun()
5253
$this->assertStringContainsString('[OK] Dry run generated', $tester->getDisplay());
5354
$this->assertStringContainsString('# send email', $tester->getDisplay());
5455
$this->assertStringContainsString(
55-
'* * * * * project_staging php7.3 path/to/staging app:test --env=staging',
56-
$tester->getDisplay()
56+
'* * * * * project_staging php7.3 path/to/staging app:test',
57+
$display = $tester->getDisplay()
5758
);
59+
$this->assertStringContainsString('APP_ENV=staging', $display);
5860
}
5961

6062
public function testCheckExecutivePath()

0 commit comments

Comments
 (0)