From f00789d2fe973e6bb92ffb0bab3ba9b1496264a9 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Tue, 10 Sep 2024 16:55:24 +1200 Subject: [PATCH] DEP Use PHPUnit 11 --- composer.json | 2 +- tests/SnifferTest.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 5a8c847..e4e3c14 100644 --- a/composer.json +++ b/composer.json @@ -24,6 +24,6 @@ "bin/mdphpcs" ], "require-dev": { - "phpunit/phpunit": "^9.6" + "phpunit/phpunit": "^11.3" } } diff --git a/tests/SnifferTest.php b/tests/SnifferTest.php index f79373c..bd29969 100644 --- a/tests/SnifferTest.php +++ b/tests/SnifferTest.php @@ -7,14 +7,14 @@ use PHPUnit\Framework\TestCase; use ReflectionMethod; use SilverStripe\MarkdownPhpCodeSniffer\Sniffer; +use PHPUnit\Framework\Attributes\DataProvider; class SnifferTest extends TestCase { /** * Validates that fenced code blocks are correctly identified and have the expected data - * - * @dataProvider provideFindFencedBlocks */ + #[DataProvider('provideFindFencedBlocks')] public function testFindFencedCodeBlocks( string $path, bool $exists, @@ -48,7 +48,7 @@ public function testFindFencedCodeBlocks( } } - public function provideFindFencedBlocks() + public static function provideFindFencedBlocks() { return [ 'nothing to lint 1' => [