Skip to content

Commit 6dac19d

Browse files
Douglasdc3sebastianbergmann
authored andcommitted
Do not create cache file by default #3237
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.
1 parent 3213386 commit 6dac19d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/TextUI/TestRunner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1157,7 +1157,7 @@ protected function handleConfiguration(array &$arguments): void
11571157
$arguments['backupStaticAttributes'] = $arguments['backupStaticAttributes'] ?? null;
11581158
$arguments['beStrictAboutChangesToGlobalState'] = $arguments['beStrictAboutChangesToGlobalState'] ?? null;
11591159
$arguments['beStrictAboutResourceUsageDuringSmallTests'] = $arguments['beStrictAboutResourceUsageDuringSmallTests'] ?? false;
1160-
$arguments['cacheResult'] = $arguments['cacheResult'] ?? true;
1160+
$arguments['cacheResult'] = $arguments['cacheResult'] ?? false;
11611161
$arguments['cacheTokens'] = $arguments['cacheTokens'] ?? false;
11621162
$arguments['colors'] = $arguments['colors'] ?? ResultPrinter::COLOR_DEFAULT;
11631163
$arguments['columns'] = $arguments['columns'] ?? 80;

tests/TextUI/defects-first-order-via-cli.phpt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ file_put_contents($tmpResultCache, file_get_contents(__DIR__ . '/../_files/Multi
88
$_SERVER['argv'][1] = '--no-configuration';
99
$_SERVER['argv'][2] = '--debug';
1010
$_SERVER['argv'][3] = '--order-by=defects';
11-
$_SERVER['argv'][4] = '--cache-result-file=' . $tmpResultCache;
12-
$_SERVER['argv'][5] = 'MultiDependencyTest';
13-
$_SERVER['argv'][6] = __DIR__ . '/../_files/MultiDependencyTest.php';
11+
$_SERVER['argv'][4] = '--cache-result';
12+
$_SERVER['argv'][5] = '--cache-result-file=' . $tmpResultCache;
13+
$_SERVER['argv'][6] = 'MultiDependencyTest';
14+
$_SERVER['argv'][7] = __DIR__ . '/../_files/MultiDependencyTest.php';
1415

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

0 commit comments

Comments
 (0)