diff --git a/README.md b/README.md index 168a819..2932209 100644 --- a/README.md +++ b/README.md @@ -278,9 +278,9 @@ Clear the test doubles registry between tests. use AspectMock\Test as test; -class UserTest extends \PHPUnit_Framework_TestCase +class UserTest extends \PHPUnit\Framework\TestCase { - protected function tearDown() + protected function tearDown(): void { test::clean(); // remove all registered test doubles } diff --git a/codeception.yml b/codeception.yml index 9c5a4ce..0bbe5b3 100644 --- a/codeception.yml +++ b/codeception.yml @@ -5,7 +5,7 @@ paths: helpers: tests/_helpers bootstrap: _bootstrap.php settings: - suite_class: \PHPUnit_Framework_TestSuite + suite_class: \PHPUnit\Framework\TestSuite colors: true memory_limit: 1024M log: true diff --git a/composer.json b/composer.json index 7f79282..af11b72 100644 --- a/composer.json +++ b/composer.json @@ -17,11 +17,11 @@ "php": "^8.2", "goaop/framework": "^4.0@dev", "goaop/parser-reflection": "^4.0@dev", - "phpunit/phpunit": "^9.5", - "symfony/finder": "^4.4 | ^5.4 | ^6.0" + "phpunit/phpunit": "^9.5 | ^10.0 | ^11.0 | ^12.0 | ^13.0", + "symfony/finder": "^4.4 | ^5.4 | ^6.0 | ^7.0" }, "require-dev": { - "codeception/codeception": "^4.1", + "codeception/codeception": "^4.1 | ^5.0", "codeception/verify": "^2.2", "codeception/specify": "^2.0", "consolidation/robo": "^3.0" diff --git a/src/AspectMock/Util/ArgumentsFormatter.php b/src/AspectMock/Util/ArgumentsFormatter.php index 4dfd3f3..e28f322 100644 --- a/src/AspectMock/Util/ArgumentsFormatter.php +++ b/src/AspectMock/Util/ArgumentsFormatter.php @@ -10,7 +10,7 @@ final class ArgumentsFormatter { public static function toString($args): string { - return implode(',',array_map('self::format', $args)); + return implode(',',array_map([self::class, 'format'], $args)); } protected static function format($arg) diff --git a/tests/_data/demo/UserModel.php b/tests/_data/demo/UserModel.php index d57f327..1a940ab 100644 --- a/tests/_data/demo/UserModel.php +++ b/tests/_data/demo/UserModel.php @@ -10,7 +10,7 @@ class UserModel { public static function getTopSecret() { - throw new \PHPUnit_Framework_AssertionFailedError("I am not going to tell you"); + throw new \PHPUnit\Framework\AssertionFailedError("I am not going to tell you"); } static function tableName()