diff --git a/Tests/Controller/ProfilerControllerTest.php b/Tests/Controller/ProfilerControllerTest.php index 5664b8b9..67355d90 100644 --- a/Tests/Controller/ProfilerControllerTest.php +++ b/Tests/Controller/ProfilerControllerTest.php @@ -136,7 +136,7 @@ public function testToolbarActionWithEmptyToken($token) $this->assertEquals(200, $response->getStatusCode()); } - public function getEmptyTokenCases() + public static function getEmptyTokenCases() { return [ [null], @@ -165,7 +165,7 @@ public function testOpeningDisallowedPaths($path, $isAllowed) } } - public function getOpenFileCases() + public static function getOpenFileCases() { return [ ['README.md', true], @@ -355,7 +355,7 @@ public function testPhpinfoAction() $this->assertStringContainsString('PHP License', $client->getResponse()->getContent()); } - public function provideCspVariants() + public static function provideCspVariants() { return [ [true], diff --git a/Tests/Csp/ContentSecurityPolicyHandlerTest.php b/Tests/Csp/ContentSecurityPolicyHandlerTest.php index c345b5fb..7d5c0761 100644 --- a/Tests/Csp/ContentSecurityPolicyHandlerTest.php +++ b/Tests/Csp/ContentSecurityPolicyHandlerTest.php @@ -46,7 +46,7 @@ public function testOnKernelResponse($nonce, $expectedNonce, Request $request, R } } - public function provideRequestAndResponses() + public static function provideRequestAndResponses() { $nonce = bin2hex(random_bytes(16)); @@ -73,7 +73,7 @@ public function provideRequestAndResponses() ]; } - public function provideRequestAndResponsesForOnKernelResponse() + public static function provideRequestAndResponsesForOnKernelResponse() { $nonce = bin2hex(random_bytes(16)); diff --git a/Tests/DependencyInjection/ConfigurationTest.php b/Tests/DependencyInjection/ConfigurationTest.php index a0bc7f43..d957cafc 100644 --- a/Tests/DependencyInjection/ConfigurationTest.php +++ b/Tests/DependencyInjection/ConfigurationTest.php @@ -29,7 +29,7 @@ public function testConfigTree(array $options, array $expectedResult) $this->assertEquals($expectedResult, $config); } - public function getDebugModes() + public static function getDebugModes() { return [ [ @@ -71,7 +71,7 @@ public function testConfigTreeUsingInterceptRedirects(bool $interceptRedirects, $this->assertEquals($expectedResult, $config); } - public function getInterceptRedirectsConfiguration() + public static function getInterceptRedirectsConfiguration() { return [ [ diff --git a/Tests/DependencyInjection/WebProfilerExtensionTest.php b/Tests/DependencyInjection/WebProfilerExtensionTest.php index fbfd2ed5..732761a5 100644 --- a/Tests/DependencyInjection/WebProfilerExtensionTest.php +++ b/Tests/DependencyInjection/WebProfilerExtensionTest.php @@ -103,7 +103,7 @@ public function testDefaultConfig($debug) self::assertSaneContainer($this->getCompiledContainer()); } - public function getDebugModes() + public static function getDebugModes() { return [ ['debug' => false], @@ -129,7 +129,7 @@ public function testToolbarConfig(bool $toolbarEnabled, bool $listenerInjected, } } - public function getToolbarConfig() + public static function getToolbarConfig() { return [ [ @@ -170,7 +170,7 @@ public function testToolbarConfigUsingInterceptRedirects( } } - public function getInterceptRedirectsToolbarConfig() + public static function getInterceptRedirectsToolbarConfig() { return [ [ diff --git a/Tests/EventListener/WebDebugToolbarListenerTest.php b/Tests/EventListener/WebDebugToolbarListenerTest.php index 845d1413..5a07af8f 100644 --- a/Tests/EventListener/WebDebugToolbarListenerTest.php +++ b/Tests/EventListener/WebDebugToolbarListenerTest.php @@ -39,7 +39,7 @@ public function testInjectToolbar($content, $expected) $this->assertEquals($expected, $response->getContent()); } - public function getInjectToolbarTests() + public static function getInjectToolbarTests() { return [ ['
', "\nWDT\n"], @@ -147,7 +147,7 @@ public function testToolbarIsNotInjectedOnRedirection($statusCode) $this->assertEquals('', $response->getContent()); } - public function provideRedirects() + public static function provideRedirects() { return [ [301], diff --git a/Tests/Resources/IconTest.php b/Tests/Resources/IconTest.php index 9ce9a4c5..721ebf59 100644 --- a/Tests/Resources/IconTest.php +++ b/Tests/Resources/IconTest.php @@ -32,7 +32,7 @@ public function testIconFileContents($iconFilePath) $this->assertMatchesRegularExpression('~~s', file_get_contents($iconFilePath), sprintf('The SVG file of the "%s" icon must include a "viewBox" attribute.', $iconFilePath)); } - public function provideIconFilePaths() + public static function provideIconFilePaths() { return array_map(function ($filePath) { return (array) $filePath; }, glob(__DIR__.'/../../Resources/views/Icon/*.svg')); } diff --git a/Tests/Twig/WebProfilerExtensionTest.php b/Tests/Twig/WebProfilerExtensionTest.php index 6b026bcc..1bb1296b 100644 --- a/Tests/Twig/WebProfilerExtensionTest.php +++ b/Tests/Twig/WebProfilerExtensionTest.php @@ -42,7 +42,7 @@ class_exists(EscaperExtension::class); // Load twig_escape_filter() self::assertSame($dump2HasHeader, str_contains($dump2, $needle)); } - public function provideMessages(): iterable + public static function provideMessages(): iterable { yield ['Some message', ['foo' => 'foo', 'bar' => 'bar'], false, true]; yield ['Some message {@see some text}', ['foo' => 'foo', 'bar' => 'bar'], false, true];