diff --git a/composer.json b/composer.json index c4e999e4..ece4f29f 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ "silverstripe/vendor-plugin": "^2" }, "require-dev": { - "phpunit/phpunit": "^9.6", + "phpunit/phpunit": "^11.3", "squizlabs/php_codesniffer": "^3.7", "silverstripe/standards": "^1", "phpstan/extension-installer": "^1.3" diff --git a/tests/ReportAdminTest.php b/tests/ReportAdminTest.php index 36776c6d..d29b2819 100644 --- a/tests/ReportAdminTest.php +++ b/tests/ReportAdminTest.php @@ -10,6 +10,7 @@ use SilverStripe\Reports\Tests\ReportAdminTest\CannotViewReport; use SilverStripe\Reports\Tests\ReportAdminTest\FakeReport; use SilverStripe\Reports\Tests\ReportAdminTest\FakeReport2; +use PHPUnit\Framework\Attributes\DataProvider; class ReportAdminTest extends FunctionalTest { @@ -46,7 +47,7 @@ public function testBreadcrumbsAreGenerated() $this->assertSame('Fake report two', $map['Title']); } - public function provideShowReport(): array + public static function provideShowReport(): array { return [ 'cannot view' => [ @@ -60,9 +61,7 @@ public function provideShowReport(): array ]; } - /** - * @dataProvider provideShowReport - */ + #[DataProvider('provideShowReport')] public function testShowReport(string $reportClass, int $expected): void { $this->logInWithPermission('ADMIN');