diff options
author | Maurício Meneghini Fauth <mauricio@fauth.dev> | 2022-07-23 20:23:55 +0300 |
---|---|---|
committer | Maurício Meneghini Fauth <mauricio@fauth.dev> | 2022-07-23 20:23:55 +0300 |
commit | 21c36a0c0619d426e6134e8cbdd37b2689b8c748 (patch) | |
tree | 532b5ed794948681d615b301eca55fd390c62673 /test | |
parent | 9897d5380323139a8cc69210ef900afb5addc5e7 (diff) |
Fix PHPUnit deprecation in RoutingTest
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Diffstat (limited to 'test')
-rw-r--r-- | test/classes/RoutingTest.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/classes/RoutingTest.php b/test/classes/RoutingTest.php index b7677e0a4a..b632837f02 100644 --- a/test/classes/RoutingTest.php +++ b/test/classes/RoutingTest.php @@ -9,6 +9,7 @@ use PhpMyAdmin\Controllers\HomeController; use PhpMyAdmin\Routing; use function copy; +use function method_exists; use function unlink; use const CACHE_DIR; @@ -48,7 +49,14 @@ class RoutingTest extends AbstractTestCase // Create new cache file. $this->assertTrue(unlink($cacheFilename)); - $this->assertFileNotExists($cacheFilename); + + if (method_exists($this, 'assertFileDoesNotExist')) { + $this->assertFileDoesNotExist($cacheFilename); + } else { + /** @psalm-suppress DeprecatedMethod */ + $this->assertFileNotExists($cacheFilename); + } + $dispatcher = Routing::getDispatcher(); $this->assertInstanceOf(Dispatcher::class, $dispatcher); $this->assertSame($expected, $dispatcher->dispatch('GET', '/')); |