Skip to content

Commit

Permalink
Speed up functional tests (see #4394)
Browse files Browse the repository at this point in the history
Description
-----------

Followup to #4376

Commits
-------

ba1eb6c0 Disable xdebug for Composer scripts
b53735db Speed up functional tests
0005a443 Fix test
e2c3b22d Delete cache after tests
241550a4 Don’t use $_SERVER['argv']
ed34fccb Revert "Disable xdebug for Composer scripts"
2035ae3f Warn if XDebug is enabled
1d08cf6f Fix Xdebug condition
  • Loading branch information
ausi committed Mar 28, 2022
1 parent 0e3a340 commit dd2b8f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tests/Console/ContaoApplicationTest.php
Expand Up @@ -26,6 +26,8 @@ protected function setUp(): void
parent::setUp();

$this->backupServerEnvGetPost();

unset($_SERVER['APP_ENV'], $_ENV['APP_ENV']);
}

protected function tearDown(): void
Expand Down
4 changes: 3 additions & 1 deletion tests/HttpKernel/ContaoKernelTest.php
Expand Up @@ -45,6 +45,8 @@ protected function setUp(): void

$this->backupServerEnvGetPost();

$_ENV['APP_ENV'] = $_SERVER['APP_ENV'] = 'prod';

$this->shellVerbosityBackup = getenv('SHELL_VERBOSITY');
}

Expand Down Expand Up @@ -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('/'));
Expand Down

0 comments on commit dd2b8f6

Please sign in to comment.