From d4297738587f65fc53b31ec0d5f80ad742aa11db Mon Sep 17 00:00:00 2001 From: muuk van der sande Date: Mon, 3 Feb 2025 15:32:48 +0100 Subject: [PATCH] Update phpunit to ^10.5, fix unit tests --- composer.json | 2 +- phpunit.xml.dist | 13 +++++++++---- .../Sniffs/Classes/MethodPerClassLimitSniffTest.php | 4 ++-- .../Classes/PropertyPerClassLimitSniffTest.php | 4 ++-- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index 73b5e33..9e202dd 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "phpcompatibility/php-compatibility": "^9.3" }, "require-dev": { - "phpunit/phpunit": "^9.5", + "phpunit/phpunit": "^10.5", "phpstan/phpstan": "^2.1", "phpstan/extension-installer": "^1.4", "phpstan/phpstan-strict-rules": "^2.0" diff --git a/phpunit.xml.dist b/phpunit.xml.dist index e167fc5..b6a4a74 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -2,15 +2,20 @@ tests - - + + src - - + + diff --git a/tests/Standards/IO/Sniffs/Classes/MethodPerClassLimitSniffTest.php b/tests/Standards/IO/Sniffs/Classes/MethodPerClassLimitSniffTest.php index a8267dc..ff83d95 100644 --- a/tests/Standards/IO/Sniffs/Classes/MethodPerClassLimitSniffTest.php +++ b/tests/Standards/IO/Sniffs/Classes/MethodPerClassLimitSniffTest.php @@ -47,7 +47,7 @@ public function testBad(string $fileName, string $tokenName): void } /** @return array> */ - public function goodDataProvider(): array + public static function goodDataProvider(): array { return [ ['MethodPerClassLimitGood.inc', ], @@ -58,7 +58,7 @@ public function goodDataProvider(): array } /** @return array> */ - public function badDataProvider(): array + public static function badDataProvider(): array { return [ ['MethodPerClassLimitBad.inc', 'class', ], diff --git a/tests/Standards/IO/Sniffs/Classes/PropertyPerClassLimitSniffTest.php b/tests/Standards/IO/Sniffs/Classes/PropertyPerClassLimitSniffTest.php index 05a9366..9abf7d9 100644 --- a/tests/Standards/IO/Sniffs/Classes/PropertyPerClassLimitSniffTest.php +++ b/tests/Standards/IO/Sniffs/Classes/PropertyPerClassLimitSniffTest.php @@ -47,7 +47,7 @@ public function testBad(string $fileName, string $tokenName): void } /** @return array> */ - public function goodDataProvider(): array + public static function goodDataProvider(): array { return [ ['PropertyPerClassLimitGood.inc', ], @@ -57,7 +57,7 @@ public function goodDataProvider(): array } /** @return array> */ - public function badDataProvider(): array + public static function badDataProvider(): array { return [ ['PropertyPerClassLimitBad.inc', 'class', ],