From 07e99017a420d0efd5d62269139966aff93e2a44 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Tue, 10 Sep 2024 11:28:49 +1200 Subject: [PATCH] DEP Use PHPUnit 11 --- composer.json | 2 +- tests/Methods/LibraryTest.php | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 80d30c7..610e38d 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ }, "require-dev": { "composer/composer": "^2", - "phpunit/phpunit": "^9.6", + "phpunit/phpunit": "^11.3", "squizlabs/php_codesniffer": "^3.7" } } diff --git a/tests/Methods/LibraryTest.php b/tests/Methods/LibraryTest.php index 1d92c2b..da40e53 100644 --- a/tests/Methods/LibraryTest.php +++ b/tests/Methods/LibraryTest.php @@ -4,12 +4,11 @@ use PHPUnit\Framework\TestCase; use SilverStripe\VendorPlugin\Library; +use PHPUnit\Framework\Attributes\DataProvider; class LibraryTest extends TestCase { - /** - * @dataProvider resourcesDirProvider - */ + #[DataProvider('resourcesDirProvider')] public function testResourcesDir($expected, $projectPath) { $path = __DIR__ . '/../fixtures/projects/' . $projectPath; @@ -17,7 +16,7 @@ public function testResourcesDir($expected, $projectPath) $this->assertEquals($expected, $lib->getResourcesDir()); } - public function resourcesDirProvider() + public static function resourcesDirProvider() { return [ ['_resources', 'ss43'],