Skip to content

Commit 2d84dc1

Browse files
committed
ADD TO: tests
1 parent 9d226db commit 2d84dc1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/Core/Util/ExitCode/ExitCodeTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,12 @@ public function testPhpcsWithCache($extraArgs, $expected)
156156
$extraArgs[] = '--cache='.self::CACHE_FILE;
157157

158158
// Make sure we start without a cache.
159-
$this->assertFileDoesNotExist(self::CACHE_FILE);
159+
if (method_exists($this, 'assertFileDoesNotExist') === true) {
160+
$this->assertFileDoesNotExist(self::CACHE_FILE);
161+
} else {
162+
// PHPUnit < 9.1.0.
163+
$this->assertFileNotExists(self::CACHE_FILE);
164+
}
160165

161166
// First run with these arguments to create the cache.
162167
$this->runPhpcsAndCheckExitCode($extraArgs, $expected);

0 commit comments

Comments
 (0)