diff --git a/composer.json b/composer.json index 266a4f9..d25077e 100644 --- a/composer.json +++ b/composer.json @@ -43,7 +43,7 @@ "symfony/console": "~3.4|~4.3|^5|^6" }, "require-dev": { - "phpunit/phpunit": "^8 || ^9 || ^10", + "phpunit/phpunit": "^8 || ^9 || ^10|| ^11", "phpstan/phpstan": "^1.4.6", "wdes/coding-standard": "^3.2" }, diff --git a/tests/Unit/ErrorFormatter/CheckstyleErrorFormatterTest.php b/tests/Unit/ErrorFormatter/CheckstyleErrorFormatterTest.php index 24a90bd..0244e5d 100644 --- a/tests/Unit/ErrorFormatter/CheckstyleErrorFormatterTest.php +++ b/tests/Unit/ErrorFormatter/CheckstyleErrorFormatterTest.php @@ -148,6 +148,7 @@ public static function dataFormatterOutputProvider(): iterable * @param int $numGenericErrors * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataFormatterOutputProvider')] public function testFormatErrors( string $message, int $exitCode, diff --git a/tests/Unit/ErrorFormatter/GithubErrorFormatterTest.php b/tests/Unit/ErrorFormatter/GithubErrorFormatterTest.php index 9bb4fe5..6e4e0b3 100644 --- a/tests/Unit/ErrorFormatter/GithubErrorFormatterTest.php +++ b/tests/Unit/ErrorFormatter/GithubErrorFormatterTest.php @@ -187,6 +187,7 @@ public static function dataFormatterOutputProvider(): iterable * @param int $numGenericErrors * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataFormatterOutputProvider')] public function testFormatErrors( string $message, int $exitCode, diff --git a/tests/Unit/ErrorFormatter/GitlabFormatterTest.php b/tests/Unit/ErrorFormatter/GitlabFormatterTest.php index d427846..905d84b 100644 --- a/tests/Unit/ErrorFormatter/GitlabFormatterTest.php +++ b/tests/Unit/ErrorFormatter/GitlabFormatterTest.php @@ -321,6 +321,7 @@ public static function dataFormatterOutputProvider(): iterable * @param string $expected * */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataFormatterOutputProvider')] public function testFormatErrors( string $message, int $exitCode, diff --git a/tests/Unit/ErrorFormatter/JsonErrorFormatterTest.php b/tests/Unit/ErrorFormatter/JsonErrorFormatterTest.php index e8a19b7..b28010f 100644 --- a/tests/Unit/ErrorFormatter/JsonErrorFormatterTest.php +++ b/tests/Unit/ErrorFormatter/JsonErrorFormatterTest.php @@ -226,6 +226,7 @@ public static function dataFormatterOutputProvider(): iterable * @param int $numGenericErrors * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataFormatterOutputProvider')] public function testPrettyFormatErrors( string $message, int $exitCode, @@ -257,6 +258,7 @@ public function testPrettyFormatErrors( * @param string $expected * */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataFormatterOutputProvider')] public function testFormatErrors( string $message, int $exitCode, diff --git a/tests/Unit/ErrorFormatter/JunitErrorFormatterTest.php b/tests/Unit/ErrorFormatter/JunitErrorFormatterTest.php index 6db164e..50f8d10 100644 --- a/tests/Unit/ErrorFormatter/JunitErrorFormatterTest.php +++ b/tests/Unit/ErrorFormatter/JunitErrorFormatterTest.php @@ -161,6 +161,7 @@ public static function dataFormatterOutputProvider(): Generator * * @dataProvider dataFormatterOutputProvider */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataFormatterOutputProvider')] public function testFormatErrors( int $exitCode, int $numFileErrors, diff --git a/tests/Unit/ErrorFormatter/RawErrorFormatterTest.php b/tests/Unit/ErrorFormatter/RawErrorFormatterTest.php index d45bff7..025b3fa 100644 --- a/tests/Unit/ErrorFormatter/RawErrorFormatterTest.php +++ b/tests/Unit/ErrorFormatter/RawErrorFormatterTest.php @@ -106,6 +106,7 @@ public static function dataFormatterOutputProvider(): iterable * @param int $numGenericErrors * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataFormatterOutputProvider')] public function testFormatErrors( string $message, int $exitCode, diff --git a/tests/Unit/ErrorFormatter/TableErrorFormatterTest.php b/tests/Unit/ErrorFormatter/TableErrorFormatterTest.php index 7b9775f..4b87528 100644 --- a/tests/Unit/ErrorFormatter/TableErrorFormatterTest.php +++ b/tests/Unit/ErrorFormatter/TableErrorFormatterTest.php @@ -172,6 +172,7 @@ public static function dataFormatterOutputProvider(): iterable * @param int $numGenericErrors * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataFormatterOutputProvider')] public function testFormatErrors( string $message, int $exitCode, diff --git a/tests/Unit/ErrorFormatter/TeamcityErrorFormatterTest.php b/tests/Unit/ErrorFormatter/TeamcityErrorFormatterTest.php index 82275b8..f5d94cb 100644 --- a/tests/Unit/ErrorFormatter/TeamcityErrorFormatterTest.php +++ b/tests/Unit/ErrorFormatter/TeamcityErrorFormatterTest.php @@ -118,6 +118,7 @@ public static function dataFormatterOutputProvider(): iterable * @param int $numGenericErrors * @param string $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataFormatterOutputProvider')] public function testFormatErrors( string $message, int $exitCode, diff --git a/tests/Unit/OutputFormatTest.php b/tests/Unit/OutputFormatTest.php index ee8c2eb..1e0df9f 100644 --- a/tests/Unit/OutputFormatTest.php +++ b/tests/Unit/OutputFormatTest.php @@ -32,6 +32,7 @@ public static function dataProviderFormatsNames(): array /** * @dataProvider dataProviderFormatsNames */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataProviderFormatsNames')] public function testValidFormats(string $formatName): void { $this->assertTrue(OutputFormat::checkOutputFormatIsValid($formatName)); @@ -40,6 +41,7 @@ public function testValidFormats(string $formatName): void /** * @dataProvider dataProviderFormatsNames */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataProviderFormatsNames')] public function testInValidFormats(string $formatName): void { $formatName = 'foo' . $formatName; @@ -54,6 +56,7 @@ public function testInValidFormats(string $formatName): void /** * @dataProvider dataProviderFormatsNames */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataProviderFormatsNames')] public function testGetFormatterForChoice(string $formatName): void { $this->assertInstanceOf(ErrorFormatter::class, OutputFormat::getFormatterForChoice($formatName, new NullRelativePathHelper())); @@ -62,6 +65,7 @@ public function testGetFormatterForChoice(string $formatName): void /** * @dataProvider dataProviderFormatsNames */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataProviderFormatsNames')] public function testGetFormatterForChoiceInvalid(string $formatName): void { $formatName = 'foo' . $formatName; @@ -75,6 +79,7 @@ public function testGetFormatterForChoiceInvalid(string $formatName): void /** * @dataProvider dataProviderFormatsNames */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataProviderFormatsNames')] public function testFormatterForChoice(string $formatName): void { OutputFormat::displayUserChoiceFormat(