From 3dbbd8b84938b409d2b69ed1177e14ca074f765e Mon Sep 17 00:00:00 2001 From: samizdam Date: Fri, 13 Mar 2020 15:26:02 +0300 Subject: [PATCH] Use phpunit version with php 7.4 supporting (see https://github.com/sebastianbergmann/phpunit/issues/3728). Remove deprecated testing methods calls. --- composer.json | 2 +- phpunit.xml.dist | 3 +++ tests/RouteTest.php | 6 +++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index d60e6da..26a111e 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,7 @@ "psr/http-server-middleware": "^1.0" }, "require-dev": { - "phpunit/phpunit" : "^7.0", + "phpunit/phpunit" : "^8.2", "squizlabs/php_codesniffer": "^3.3", "phpstan/phpstan": "^0.10.3", "phpstan/phpstan-phpunit": "^0.10.0" diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 1f0d1c0..a7bcbca 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -9,6 +9,9 @@ convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false"> + + + tests diff --git a/tests/RouteTest.php b/tests/RouteTest.php index 76fbbb9..3962ffb 100644 --- a/tests/RouteTest.php +++ b/tests/RouteTest.php @@ -20,7 +20,7 @@ public function testRouteSetsAndResolvesInvokableClassCallable(): void { $callable = new Controller; $route = new Route('GET', '/', $callable); - $this->assertInternalType('callable', $route->getCallable()); + $this->assertIsCallable($route->getCallable()); } /** @@ -32,7 +32,7 @@ public function testRouteSetsAndResolvesClassMethodCallable(): void { $callable = [new Controller, 'action']; $route = new Route('GET', '/', $callable); - $this->assertInternalType('callable', $route->getCallable()); + $this->assertIsCallable($route->getCallable()); } /** @@ -44,7 +44,7 @@ public function testRouteSetsAndResolvesNamedFunctionCallable(): void { $callable = 'League\Route\Fixture\namedFunctionCallable'; $route = new Route('GET', '/', $callable); - $this->assertInternalType('callable', $route->getCallable()); + $this->assertIsCallable($route->getCallable()); } /**