Skip to content

Commit

Permalink
Do not create cache file by default #3237
Browse files Browse the repository at this point in the history
The documentation read this feature is disabled by default it was enabled anyway.

Disable it by default to maintain backwards compatibility and allow tests to run on read only filesystem.
  • Loading branch information
Douglasdc3 authored and sebastianbergmann committed Aug 4, 2018
1 parent 3213386 commit 6dac19d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/TextUI/TestRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,7 @@ protected function handleConfiguration(array &$arguments): void
$arguments['backupStaticAttributes'] = $arguments['backupStaticAttributes'] ?? null;
$arguments['beStrictAboutChangesToGlobalState'] = $arguments['beStrictAboutChangesToGlobalState'] ?? null;
$arguments['beStrictAboutResourceUsageDuringSmallTests'] = $arguments['beStrictAboutResourceUsageDuringSmallTests'] ?? false;
$arguments['cacheResult'] = $arguments['cacheResult'] ?? true;
$arguments['cacheResult'] = $arguments['cacheResult'] ?? false;
$arguments['cacheTokens'] = $arguments['cacheTokens'] ?? false;
$arguments['colors'] = $arguments['colors'] ?? ResultPrinter::COLOR_DEFAULT;
$arguments['columns'] = $arguments['columns'] ?? 80;
Expand Down
7 changes: 4 additions & 3 deletions tests/TextUI/defects-first-order-via-cli.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ file_put_contents($tmpResultCache, file_get_contents(__DIR__ . '/../_files/Multi
$_SERVER['argv'][1] = '--no-configuration';
$_SERVER['argv'][2] = '--debug';
$_SERVER['argv'][3] = '--order-by=defects';
$_SERVER['argv'][4] = '--cache-result-file=' . $tmpResultCache;
$_SERVER['argv'][5] = 'MultiDependencyTest';
$_SERVER['argv'][6] = __DIR__ . '/../_files/MultiDependencyTest.php';
$_SERVER['argv'][4] = '--cache-result';
$_SERVER['argv'][5] = '--cache-result-file=' . $tmpResultCache;
$_SERVER['argv'][6] = 'MultiDependencyTest';
$_SERVER['argv'][7] = __DIR__ . '/../_files/MultiDependencyTest.php';

require __DIR__ . '/../bootstrap.php';
PHPUnit\TextUI\Command::main();
Expand Down

0 comments on commit 6dac19d

Please sign in to comment.