Skip to content

Commit ed9f0eb

Browse files
Merge branch '5.4' into 6.2
* 5.4: Migrate to `static` data providers using `rector/rector`
2 parents f95186c + 55b0015 commit ed9f0eb

11 files changed

+22
-22
lines changed

Tests/Generator/UrlGeneratorTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public function testAbsoluteUrlWithExtraParameters(string $expectedQueryString,
130130
$this->assertSame('http://localhost/app.php/testing'.$expectedQueryString, $url);
131131
}
132132

133-
public function valuesProvider(): array
133+
public static function valuesProvider(): array
134134
{
135135
$stdClass = new \stdClass();
136136
$stdClass->baz = 'bar';
@@ -894,7 +894,7 @@ public function testGetRelativePath($sourcePath, $targetPath, $expectedPath)
894894
$this->assertSame($expectedPath, UrlGenerator::getRelativePath($sourcePath, $targetPath));
895895
}
896896

897-
public function provideRelativePaths()
897+
public static function provideRelativePaths()
898898
{
899899
return [
900900
[
@@ -1036,7 +1036,7 @@ public function testLookRoundRequirementsInPath($expected, $path, $requirement)
10361036
$this->assertSame($expected, $this->getGenerator($routes)->generate('test', ['foo' => 'a/b', 'baz' => 'c/d/e']));
10371037
}
10381038

1039-
public function provideLookAroundRequirementsInPath()
1039+
public static function provideLookAroundRequirementsInPath()
10401040
{
10411041
yield ['/app.php/a/b/b%28ar/c/d/e', '/{foo}/b(ar/{baz}', '.+(?=/b\\(ar/)'];
10421042
yield ['/app.php/a/b/bar/c/d/e', '/{foo}/bar/{baz}', '.+(?!$)'];

Tests/Loader/AnnotationClassLoaderTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function testSupportsChecksResource($resource, $expectedSupports)
3030
$this->assertSame($expectedSupports, $this->loader->supports($resource), '->supports() returns true if the resource is loadable');
3131
}
3232

33-
public function provideTestSupportsChecksResource()
33+
public static function provideTestSupportsChecksResource()
3434
{
3535
return [
3636
['class', true],

Tests/Loader/ContainerLoaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function testSupports(bool $expected, string $type = null)
2525
$this->assertSame($expected, (new ContainerLoader(new Container()))->supports('foo', $type));
2626
}
2727

28-
public function supportsProvider()
28+
public static function supportsProvider()
2929
{
3030
return [
3131
[true, 'service'],

Tests/Loader/ObjectLoaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function testExceptionWithoutSyntax(string $resourceString)
5050
$loader->load($resourceString);
5151
}
5252

53-
public function getBadResourceStrings()
53+
public static function getBadResourceStrings()
5454
{
5555
return [
5656
['Foo:Bar:baz'],

Tests/Loader/XmlFileLoaderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ public function testLoadThrowsExceptionWithInvalidFileEvenWithoutSchemaValidatio
234234
$loader->load($filePath);
235235
}
236236

237-
public function getPathsToInvalidFiles()
237+
public static function getPathsToInvalidFiles()
238238
{
239239
return [
240240
['nonvalidnode.xml'],
@@ -482,7 +482,7 @@ public function testImportRouteWithController($file)
482482
$this->assertSame('FrameworkBundle:Template:template', $route->getDefault('_controller'));
483483
}
484484

485-
public function provideFilesImportingRoutesWithControllers()
485+
public static function provideFilesImportingRoutesWithControllers()
486486
{
487487
yield ['import_controller.xml'];
488488
yield ['import__controller.xml'];

Tests/Loader/YamlFileLoaderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function testLoadThrowsExceptionWithInvalidFile($filePath)
5656
$loader->load($filePath);
5757
}
5858

59-
public function getPathsToInvalidFiles()
59+
public static function getPathsToInvalidFiles()
6060
{
6161
return [
6262
['nonvalid.yml'],
@@ -175,7 +175,7 @@ public function testImportRouteWithController($file)
175175
$this->assertSame('FrameworkBundle:Template:template', $route->getDefault('_controller'));
176176
}
177177

178-
public function provideFilesImportingRoutesWithControllers()
178+
public static function provideFilesImportingRoutesWithControllers()
179179
{
180180
yield ['import_controller.yml'];
181181
yield ['import__controller.yml'];

Tests/Matcher/Dumper/CompiledUrlMatcherDumperTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function testDump(RouteCollection $collection, $fixture)
6565
$this->assertStringEqualsFile($basePath.$fixture, $dumper->dump());
6666
}
6767

68-
public function getRouteCollections()
68+
public static function getRouteCollections()
6969
{
7070
/* test case 1 */
7171

Tests/Matcher/Dumper/StaticPrefixCollectionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function testGrouping(array $routes, $expected)
3434
$this->assertEquals($expected, $dumped);
3535
}
3636

37-
public function routeProvider()
37+
public static function routeProvider()
3838
{
3939
return [
4040
'Simple - not nested' => [

Tests/Matcher/ExpressionLanguageProviderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function testCompile(string $expression, string $expected)
5959
$this->assertSame($expected, $this->expressionLanguage->compile($expression));
6060
}
6161

62-
public function compileProvider(): iterable
62+
public static function compileProvider(): iterable
6363
{
6464
return [
6565
['env("APP_ENV")', '($context->getParameter(\'_functions\')->get(\'env\')("APP_ENV"))'],
@@ -76,7 +76,7 @@ public function testEvaluate(string $expression, $expected)
7676
$this->assertSame($expected, $this->expressionLanguage->evaluate($expression, ['context' => $this->context]));
7777
}
7878

79-
public function evaluateProvider(): iterable
79+
public static function evaluateProvider(): iterable
8080
{
8181
return [
8282
['env("APP_ENV")', 'test'],

Tests/RouteCompilerTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function testCompile($name, $arguments, $prefix, $regex, $variables, $tok
3232
$this->assertEquals($tokens, $compiled->getTokens(), $name.' (tokens)');
3333
}
3434

35-
public function provideCompileData()
35+
public static function provideCompileData()
3636
{
3737
return [
3838
[
@@ -199,7 +199,7 @@ public function testCompileImplicitUtf8Data($name, $arguments, $prefix, $regex,
199199
$this->assertEquals($tokens, $compiled->getTokens(), $name.' (tokens)');
200200
}
201201

202-
public function provideCompileImplicitUtf8Data()
202+
public static function provideCompileImplicitUtf8Data()
203203
{
204204
return [
205205
[
@@ -284,7 +284,7 @@ public function testRouteWithVariableNameStartingWithADigit($name)
284284
$route->compile();
285285
}
286286

287-
public function getVariableNamesStartingWithADigit()
287+
public static function getVariableNamesStartingWithADigit()
288288
{
289289
return [
290290
['09'],
@@ -312,7 +312,7 @@ public function testCompileWithHost($name, $arguments, $prefix, $regex, $variabl
312312
$this->assertEquals($hostTokens, $compiled->getHostTokens(), $name.' (host tokens)');
313313
}
314314

315-
public function provideCompileWithHostData()
315+
public static function provideCompileWithHostData()
316316
{
317317
return [
318318
[
@@ -381,7 +381,7 @@ public function testRemoveCapturingGroup($regex, $requirement)
381381
$this->assertSame($regex, $route->compile()->getRegex());
382382
}
383383

384-
public function provideRemoveCapturingGroup()
384+
public static function provideRemoveCapturingGroup()
385385
{
386386
yield ['{^/(?P<foo>a(?:b|c)(?:d|e)f)$}sD', 'a(b|c)(d|e)f'];
387387
yield ['{^/(?P<foo>a\(b\)c)$}sD', 'a\(b\)c'];

0 commit comments

Comments
 (0)