diff --git a/tests/Console/ContaoApplicationTest.php b/tests/Console/ContaoApplicationTest.php index 3ac847f..1d1a7a4 100644 --- a/tests/Console/ContaoApplicationTest.php +++ b/tests/Console/ContaoApplicationTest.php @@ -26,6 +26,8 @@ protected function setUp(): void parent::setUp(); $this->backupServerEnvGetPost(); + + unset($_SERVER['APP_ENV'], $_ENV['APP_ENV']); } protected function tearDown(): void diff --git a/tests/HttpKernel/ContaoKernelTest.php b/tests/HttpKernel/ContaoKernelTest.php index 5d77d96..73e4c39 100644 --- a/tests/HttpKernel/ContaoKernelTest.php +++ b/tests/HttpKernel/ContaoKernelTest.php @@ -45,6 +45,8 @@ protected function setUp(): void $this->backupServerEnvGetPost(); + $_ENV['APP_ENV'] = $_SERVER['APP_ENV'] = 'prod'; + $this->shellVerbosityBackup = getenv('SHELL_VERBOSITY'); } @@ -369,7 +371,7 @@ public function testReturnsTheContaoKernelInDevMode(): void */ public function testReturnsTheContaoCacheInProdMode(): void { - unset($_SERVER['APP_ENV']); + unset($_SERVER['APP_ENV'], $_ENV['APP_ENV'], $_ENV['DISABLE_HTTP_CACHE'], $_SERVER['DISABLE_HTTP_CACHE']); $tempDir = realpath($this->getTempDir()); $kernel = ContaoKernel::fromRequest($tempDir, Request::create('/'));