Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
flohw committed Jul 17, 2024
1 parent a2571bb commit 50803cc
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Tests/Functional/Command/GenerateCronFileCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 50803cc

Please sign in to comment.