Skip to content

Commit bed0998

Browse files
OskarStarknicolas-grekas
authored andcommitted
Migrate to static data providers using rector/rector
1 parent 5179659 commit bed0998

26 files changed

+50
-50
lines changed

Tests/AliasTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public function testCannotDeprecateWithAnInvalidTemplate($message)
128128
$def->setDeprecated('package', '1.1', $message);
129129
}
130130

131-
public function invalidDeprecationMessageProvider()
131+
public static function invalidDeprecationMessageProvider()
132132
{
133133
return [
134134
"With \rs" => ["invalid \r message %alias_id%"],

Tests/Argument/TaggedIteratorArgumentTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function testDefaultIndexMethod(?string $indexAttribute, ?string $default
6767
$this->assertSame($expectedDefaultIndexMethod, $taggedIteratorArgument->getDefaultIndexMethod());
6868
}
6969

70-
public function defaultIndexMethodProvider()
70+
public static function defaultIndexMethodProvider()
7171
{
7272
yield 'No indexAttribute and no defaultIndexMethod' => [
7373
null,
@@ -116,7 +116,7 @@ public function testDefaultPriorityIndexMethod(?string $indexAttribute, ?string
116116
$this->assertSame($expectedDefaultPriorityMethod, $taggedIteratorArgument->getDefaultPriorityMethod());
117117
}
118118

119-
public function defaultPriorityMethodProvider()
119+
public static function defaultPriorityMethodProvider()
120120
{
121121
yield 'No indexAttribute and no defaultPriorityMethod' => [
122122
null,

Tests/ChildDefinitionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function testSetProperty($property, $changeKey)
4040
$this->assertSame([$changeKey => true], $def->getChanges());
4141
}
4242

43-
public function getPropertyTests()
43+
public static function getPropertyTests()
4444
{
4545
return [
4646
['class', 'class'],

Tests/Compiler/AliasDeprecatedPublicServicesPassTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function testProcessWithMissingAttribute(string $attribute, array $attrib
5858
(new AliasDeprecatedPublicServicesPass())->process($container);
5959
}
6060

61-
public function processWithMissingAttributeProvider()
61+
public static function processWithMissingAttributeProvider()
6262
{
6363
return [
6464
['package', ['version' => '1.2']],

Tests/Compiler/AutowirePassTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,7 @@ public function testNotWireableCalls($method, $expectedMsg)
954954
}
955955
}
956956

957-
public function provideNotWireableCalls()
957+
public static function provideNotWireableCalls()
958958
{
959959
return [
960960
['setNotAutowireable', 'Cannot autowire service "foo": argument "$n" of method "Symfony\Component\DependencyInjection\Tests\Compiler\NotWireable::setNotAutowireable()" has type "Symfony\Component\DependencyInjection\Tests\Compiler\NotARealClass" but this class was not found.'],

Tests/Compiler/CheckArgumentsValidityPassTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function testException(array $arguments, array $methodCalls)
5656
$pass->process($container);
5757
}
5858

59-
public function definitionProvider()
59+
public static function definitionProvider()
6060
{
6161
return [
6262
[['a' => 'a', null], []],

Tests/Compiler/IntegrationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ public function testYamlContainerCompiles($directory, $actualServiceId, $expecte
264264
$this->assertEquals($expectedService, $actualService);
265265
}
266266

267-
public function getYamlCompileTests()
267+
public static function getYamlCompileTests()
268268
{
269269
$container = new ContainerBuilder();
270270
$container->registerForAutoconfiguration(IntegrationTestStub::class);

Tests/Compiler/PriorityTaggedServiceTraitTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public function testTheIndexedTagsByDefaultIndexMethodFailure(string $defaultInd
182182
$priorityTaggedServiceTraitImplementation->test($tag, $container);
183183
}
184184

185-
public function provideInvalidDefaultMethods(): iterable
185+
public static function provideInvalidDefaultMethods(): iterable
186186
{
187187
yield ['getMethodShouldBeStatic', null, sprintf('Method "%s::getMethodShouldBeStatic()" should be static.', FooTaggedForInvalidDefaultMethodClass::class)];
188188
yield ['getMethodShouldBeStatic', 'foo', sprintf('Either method "%s::getMethodShouldBeStatic()" should be static or tag "my_custom_tag" on service "service1" is missing attribute "foo".', FooTaggedForInvalidDefaultMethodClass::class)];

Tests/Compiler/ResolveClassPassTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function testResolveClassFromId($serviceId)
3333
$this->assertSame($serviceId, $def->getClass());
3434
}
3535

36-
public function provideValidClassId()
36+
public static function provideValidClassId()
3737
{
3838
yield ['Acme\UnknownClass'];
3939
yield [CaseSensitiveClass::class];
@@ -52,7 +52,7 @@ public function testWontResolveClassFromId($serviceId)
5252
$this->assertNull($def->getClass());
5353
}
5454

55-
public function provideInvalidClassId()
55+
public static function provideInvalidClassId()
5656
{
5757
yield [\stdClass::class];
5858
yield ['bar'];

Tests/Compiler/ResolveFactoryClassPassTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function testInlinedDefinitionFactoryIsProcessed()
4646
$this->assertSame(['Baz\Qux', 'getInstance'], $factory->getFactory()[0]->getFactory());
4747
}
4848

49-
public function provideFulfilledFactories()
49+
public static function provideFulfilledFactories()
5050
{
5151
return [
5252
[['Foo\Bar', 'create']],

0 commit comments

Comments
 (0)