diff --git a/src/Testing/LevelsTestCase.php b/src/Testing/LevelsTestCase.php index 68bd5f0ae0..a42f1fb3bd 100644 --- a/src/Testing/LevelsTestCase.php +++ b/src/Testing/LevelsTestCase.php @@ -169,7 +169,7 @@ private function compareFiles(string $expectedJsonFile, array $expectedMessages) { if (count($expectedMessages) === 0) { try { - self::assertFileDoesNotExist($expectedJsonFile); + self::ourCustomAssertFileDoesNotExist($expectedJsonFile); return null; } catch (AssertionFailedError $e) { unlink($expectedJsonFile); @@ -192,8 +192,9 @@ private function compareFiles(string $expectedJsonFile, array $expectedMessages) return null; } - public static function assertFileDoesNotExist(string $filename, string $message = ''): void + public static function ourCustomAssertFileDoesNotExist(string $filename, string $message = ''): void { + // this method is no longer called assertFileDoesNotExist because this method is final in PHPUnit 10 if (!method_exists(parent::class, 'assertFileDoesNotExist')) { parent::assertFileNotExists($filename, $message); return;