From 8cd77f94c27e271c78b7c33624465bd593364dea Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Fri, 6 Sep 2024 17:31:10 +1200 Subject: [PATCH] DEP Use PHPUnit 11 --- tests/Auth/HandlerTest.php | 2 +- tests/ControllerTest.php | 2 +- .../ReadFileUsageQueryCreatorTest.php | 2 +- tests/Modules/CMS/LinkablePluginTest.php | 2 +- tests/Schema/AbstractTypeRegistryTest.php | 2 +- tests/Schema/DataObject/Plugin/FiltersTest.php | 2 +- .../DataObject/Plugin/InheritanceTest.php | 2 +- tests/Schema/IntegrationTest.php | 18 +++++++++--------- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/Auth/HandlerTest.php b/tests/Auth/HandlerTest.php index 7a62b10e..e6acefd9 100644 --- a/tests/Auth/HandlerTest.php +++ b/tests/Auth/HandlerTest.php @@ -92,7 +92,7 @@ public function testAuthenticatorsCanBePrioritised($authenticators, $expected) /** * @return array */ - public function prioritisedAuthenticatorProvider() + public static function prioritisedAuthenticatorProvider() { return [ [ diff --git a/tests/ControllerTest.php b/tests/ControllerTest.php index 45c86418..1560418e 100644 --- a/tests/ControllerTest.php +++ b/tests/ControllerTest.php @@ -14,7 +14,7 @@ class ControllerTest extends SapphireTest { protected $usesDatabase = false; - public function providePrepareBacktrace() + public static function providePrepareBacktrace() { $querySource = <<<'GRAPHQL' query ReadFiles($filter: FakeInputType!) { diff --git a/tests/Modules/AssetAdmin/ReadFileUsageQueryCreatorTest.php b/tests/Modules/AssetAdmin/ReadFileUsageQueryCreatorTest.php index 620467a4..a3ca842e 100644 --- a/tests/Modules/AssetAdmin/ReadFileUsageQueryCreatorTest.php +++ b/tests/Modules/AssetAdmin/ReadFileUsageQueryCreatorTest.php @@ -38,7 +38,7 @@ protected function tearDown(): void parent::tearDown(); } - public function fileUsageDataProvider() + public static function fileUsageDataProvider() { return [ [File::class, 'rootfile', 2, 'rootfile file is used twice'], diff --git a/tests/Modules/CMS/LinkablePluginTest.php b/tests/Modules/CMS/LinkablePluginTest.php index 70b00032..0b926d14 100644 --- a/tests/Modules/CMS/LinkablePluginTest.php +++ b/tests/Modules/CMS/LinkablePluginTest.php @@ -102,7 +102,7 @@ public function testResolver() } - public function provideApply() + public static function provideApply() { return [ [true], diff --git a/tests/Schema/AbstractTypeRegistryTest.php b/tests/Schema/AbstractTypeRegistryTest.php index 8fca02d4..0bdc8898 100644 --- a/tests/Schema/AbstractTypeRegistryTest.php +++ b/tests/Schema/AbstractTypeRegistryTest.php @@ -93,7 +93,7 @@ public function testRebuildOnMissing( $this->assertSame($expected, $canRebuildOnMissingMethod->invoke($registry)); } - public function provideRebuildOnMissing(): array + public static function provideRebuildOnMissing(): array { // controller = current controller is a GraphQLController // autobuild = if autobuild is enabled diff --git a/tests/Schema/DataObject/Plugin/FiltersTest.php b/tests/Schema/DataObject/Plugin/FiltersTest.php index 17735427..dd4979f7 100644 --- a/tests/Schema/DataObject/Plugin/FiltersTest.php +++ b/tests/Schema/DataObject/Plugin/FiltersTest.php @@ -40,7 +40,7 @@ public function testFilterArguments(FieldFilterInterface $filter, string $identi } } - public function filterArgumentsProvider(): array + public static function filterArgumentsProvider(): array { return [ [ diff --git a/tests/Schema/DataObject/Plugin/InheritanceTest.php b/tests/Schema/DataObject/Plugin/InheritanceTest.php index 5e0a2e35..2d53641f 100644 --- a/tests/Schema/DataObject/Plugin/InheritanceTest.php +++ b/tests/Schema/DataObject/Plugin/InheritanceTest.php @@ -168,7 +168,7 @@ private function assertCalls(array $expected, array $actual) $this->assertEmpty(array_diff($compare ?? [], $expected), 'Actual calls exceed the expected calls'); } - public function provideUnionOption() + public static function provideUnionOption() { return [ [true], diff --git a/tests/Schema/IntegrationTest.php b/tests/Schema/IntegrationTest.php index 70a5df58..9cac9432 100644 --- a/tests/Schema/IntegrationTest.php +++ b/tests/Schema/IntegrationTest.php @@ -418,7 +418,7 @@ public function testNestedFieldDefinitions() $this->assertMissingField($result, 'title'); } - public function provideFilterAndSort(): array + public static function provideFilterAndSort(): array { return [ [ @@ -671,7 +671,7 @@ public function testFieldAliases() $this->assertResult('readOneDataObjectFake.author', null, $result); } - public function provideFilterAndSortOnlyRead(): array + public static function provideFilterAndSortOnlyRead(): array { return [ 'read with sort' => [ @@ -847,7 +847,7 @@ public function testFilterAndSortOnlyRead(string $fixture, string $query, array $this->assertResults($expected, $records); } - public function provideFilterAndSortWithArgsOnlyRead(): array + public static function provideFilterAndSortWithArgsOnlyRead(): array { return [ 'read with sort - with sort arg' => [ @@ -1502,7 +1502,7 @@ public function testBulkLoadNamespaceAndFilepath() /** * @return array */ - public function provideObfuscationState(): array + public static function provideObfuscationState(): array { return [ [false], [true] ]; } @@ -1593,7 +1593,7 @@ public function testDefaultDepthLimit(int $queryDepth, int $limit) } } - public function provideDefaultDepthLimit() + public static function provideDefaultDepthLimit() { return $this->createProviderForComplexityOrDepth(15); } @@ -1614,7 +1614,7 @@ public function testCustomDepthLimit(int $queryDepth, int $limit) } } - public function provideCustomDepthLimit() + public static function provideCustomDepthLimit() { return $this->createProviderForComplexityOrDepth(25); } @@ -1635,7 +1635,7 @@ public function testCustomComplexityLimit(int $queryComplexity, int $limit) } } - public function provideCustomComplexityLimit() + public static function provideCustomComplexityLimit() { return $this->createProviderForComplexityOrDepth(10); } @@ -1649,7 +1649,7 @@ public function testDefaultNodeLimit(int $numNodes, int $limit) $this->runNodeLimitTest($numNodes, $limit, $schema); } - public function provideDefaultNodeLimit() + public static function provideDefaultNodeLimit() { return $this->createProviderForComplexityOrDepth(500); } @@ -1663,7 +1663,7 @@ public function testCustomNodeLimit(int $numNodes, int $limit) $this->runNodeLimitTest($numNodes, $limit, $schema); } - public function provideCustomNodeLimit() + public static function provideCustomNodeLimit() { return $this->createProviderForComplexityOrDepth(200); }