Skip to content

Commit dae368b

Browse files
Merge branch '5.4' into 6.2
* 5.4: Migrate to `static` data providers using `rector/rector`
2 parents 718d23f + 4ff8d7d commit dae368b

15 files changed

+23
-23
lines changed

Tests/AppVariableTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function testDebug($debugFlag)
4343
$this->assertEquals($debugFlag, $this->appVariable->getDebug());
4444
}
4545

46-
public function debugDataProvider()
46+
public static function debugDataProvider()
4747
{
4848
return [
4949
'debug on' => [true],

Tests/Command/DebugCommandTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function testDebugTemplateName(array $input, string $output, array $paths
8484
$this->assertStringMatchesFormat($output, $tester->getDisplay(true));
8585
}
8686

87-
public function getDebugTemplateNameTestData()
87+
public static function getDebugTemplateNameTestData()
8888
{
8989
$defaultPaths = [
9090
'templates/' => null,
@@ -311,7 +311,7 @@ public function testComplete(array $input, array $expectedSuggestions)
311311
$this->assertSame($expectedSuggestions, $suggestions);
312312
}
313313

314-
public function provideCompletionSuggestions(): iterable
314+
public static function provideCompletionSuggestions(): iterable
315315
{
316316
yield 'name' => [['email'], []];
317317
yield 'option --format' => [['--format', ''], ['text', 'json']];

Tests/Command/LintCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public function testComplete(array $input, array $expectedSuggestions)
146146
$this->assertSame($expectedSuggestions, $tester->complete($input));
147147
}
148148

149-
public function provideCompletionSuggestions()
149+
public static function provideCompletionSuggestions()
150150
{
151151
yield 'option' => [['--format', ''], ['txt', 'json', 'github']];
152152
}

Tests/Extension/CodeExtensionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ public function testGettingMethodAbbreviation($method, $abbr)
4444
$this->assertEquals($this->getExtension()->abbrMethod($method), $abbr);
4545
}
4646

47-
public function getClassNameProvider(): array
47+
public static function getClassNameProvider(): array
4848
{
4949
return [
5050
['F\Q\N\Foo', '<abbr title="F\Q\N\Foo">Foo</abbr>'],
5151
['Bare', '<abbr title="Bare">Bare</abbr>'],
5252
];
5353
}
5454

55-
public function getMethodNameProvider(): array
55+
public static function getMethodNameProvider(): array
5656
{
5757
return [
5858
['F\Q\N\Foo::Method', '<abbr title="F\Q\N\Foo">Foo</abbr>::Method()'],

Tests/Extension/DumpExtensionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function testDumpTag($template, $debug, $expectedOutput, $expectedDumped)
5353
$this->assertSame($expectedDumped, $dumped);
5454
}
5555

56-
public function getDumpTags()
56+
public static function getDumpTags()
5757
{
5858
return [
5959
['A{% dump %}B', true, 'AB', []],
@@ -88,7 +88,7 @@ public function testDump($context, $args, $expectedOutput, $debug = true)
8888
$this->assertEquals($expectedOutput, $dump);
8989
}
9090

91-
public function getDumpArgs()
91+
public static function getDumpArgs()
9292
{
9393
return [
9494
[[], [], '', false],

Tests/Extension/FormExtensionDivLayoutTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public function testThemeBlockInheritanceUsingDynamicExtend()
100100
);
101101
}
102102

103-
public function isSelectedChoiceProvider()
103+
public static function isSelectedChoiceProvider()
104104
{
105105
return [
106106
[true, '0', '0'],
@@ -150,7 +150,7 @@ public function testStartTagHasActionAttributeWhenActionIsZero()
150150
$this->assertSame('<form name="form" method="get" action="0">', $html);
151151
}
152152

153-
public function isRootFormProvider()
153+
public static function isRootFormProvider()
154154
{
155155
return [
156156
[true, new FormView()],

Tests/Extension/HttpFoundationExtensionTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function testGenerateAbsoluteUrl($expected, $path, $pathinfo)
3232
$this->assertEquals($expected, $extension->generateAbsoluteUrl($path));
3333
}
3434

35-
public function getGenerateAbsoluteUrlData()
35+
public static function getGenerateAbsoluteUrlData()
3636
{
3737
return [
3838
['http://localhost/foo.png', '/foo.png', '/foo/bar.html'],
@@ -76,7 +76,7 @@ public function testGenerateAbsoluteUrlWithoutRequestAndRequestContext($path)
7676
$this->assertEquals($path, $extension->generateAbsoluteUrl($path));
7777
}
7878

79-
public function getGenerateAbsoluteUrlRequestContextData()
79+
public static function getGenerateAbsoluteUrlRequestContextData()
8080
{
8181
return [
8282
['/foo.png', '/foo', 'localhost', 'http', 80, 443, 'http://localhost/foo.png'],
@@ -117,7 +117,7 @@ public function testGenerateRelativePath($expected, $path, $pathinfo)
117117
$this->assertEquals($expected, $extension->generateRelativePath($path));
118118
}
119119

120-
public function getGenerateRelativePathData()
120+
public static function getGenerateRelativePathData()
121121
{
122122
return [
123123
['../foo.png', '/foo.png', '/foo/bar.html'],

Tests/Extension/RoutingExtensionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function testEscaping($template, $mustBeEscaped)
3434
$this->assertSame($mustBeEscaped, $nodes->getNode('body')->getNode(0)->getNode('expr') instanceof FilterExpression);
3535
}
3636

37-
public function getEscapingTemplates()
37+
public static function getEscapingTemplates()
3838
{
3939
return [
4040
['{{ path("foo") }}', false],

Tests/Extension/SerializerExtensionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function testSerializeFilter(string $template, string $expectedResult)
4141
self::assertSame($expectedResult, $twig->render('template', ['object' => new SerializerModelFixture()]));
4242
}
4343

44-
public function serializerDataProvider(): \Generator
44+
public static function serializerDataProvider(): \Generator
4545
{
4646
yield ['{{ object|serialize }}', '{&quot;name&quot;:&quot;howdy&quot;,&quot;title&quot;:&quot;fixture&quot;}'];
4747
yield ['{{ object|serialize(\'yaml\') }}', '{ name: howdy, title: fixture }'];

Tests/Extension/StopwatchExtensionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function testTiming($template, $events)
4141
}
4242
}
4343

44-
public function getTimingTemplates()
44+
public static function getTimingTemplates()
4545
{
4646
return [
4747
['{% stopwatch "foo" %}something{% endstopwatch %}', 'foo'],

0 commit comments

Comments
 (0)