Skip to content

Commit c2314d8

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

File tree

50 files changed

+92
-92
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+92
-92
lines changed

Tests/AbstractLayoutTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2770,7 +2770,7 @@ public function testSubmitFormNoValidate(bool $validate)
27702770
$this->assertMatchesXpath($html, $xpath);
27712771
}
27722772

2773-
public function submitFormNoValidateProvider()
2773+
public static function submitFormNoValidateProvider()
27742774
{
27752775
return [
27762776
[false],

Tests/AbstractRequestHandlerTestCase.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public static function methodExceptGetProvider()
7575
];
7676
}
7777

78-
public function methodProvider()
78+
public static function methodProvider()
7979
{
8080
return array_merge([
8181
['GET'],
@@ -348,7 +348,7 @@ public function testAddFormErrorIfPostMaxSizeExceeded(?int $contentLength, strin
348348
}
349349
}
350350

351-
public function getPostMaxSizeFixtures()
351+
public static function getPostMaxSizeFixtures()
352352
{
353353
return [
354354
[1024 ** 3 + 1, '1G', true, ['{{ max }}' => '1G']],
@@ -381,7 +381,7 @@ public function testFailedFileUploadIsTurnedIntoFormError($errorCode, $expectedE
381381
$this->assertSame($expectedErrorCode, $this->requestHandler->getUploadFileError($this->getFailedUploadedFile($errorCode)));
382382
}
383383

384-
public function uploadFileErrorCodes()
384+
public static function uploadFileErrorCodes()
385385
{
386386
return [
387387
'no error' => [\UPLOAD_ERR_OK, null],

Tests/ButtonBuilderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*/
2121
class ButtonBuilderTest extends TestCase
2222
{
23-
public function getValidNames()
23+
public static function getValidNames()
2424
{
2525
return [
2626
['reset'],
@@ -47,7 +47,7 @@ public function testNameContainingIllegalCharacters()
4747
$this->assertInstanceOf(ButtonBuilder::class, new ButtonBuilder('button[]'));
4848
}
4949

50-
public function getInvalidNames()
50+
public static function getInvalidNames()
5151
{
5252
return [
5353
[''],

Tests/ButtonTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function testDisabledIfParentIsDisabled($parentDisabled, $buttonDisabled,
5757
$this->assertSame($result, $button->isDisabled());
5858
}
5959

60-
public function getDisabledStates()
60+
public static function getDisabledStates()
6161
{
6262
return [
6363
// parent, button, result

Tests/ChoiceList/Factory/CachingFactoryDecoratorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ public function testCreateViewDifferentAttributesClosure()
555555
$this->assertEquals(new ChoiceListView(), $view2);
556556
}
557557

558-
public function provideSameChoices()
558+
public static function provideSameChoices()
559559
{
560560
$object = (object) ['foo' => 'bar'];
561561

@@ -568,7 +568,7 @@ public function provideSameChoices()
568568
];
569569
}
570570

571-
public function provideDistinguishedChoices()
571+
public static function provideDistinguishedChoices()
572572
{
573573
return [
574574
[0, false],

Tests/Command/DebugCommandTest.php

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

209-
public function provideCompletionSuggestions(): iterable
209+
public static function provideCompletionSuggestions(): iterable
210210
{
211211
yield 'option --format' => [
212212
['--format', ''],

Tests/CompoundFormTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ public function testSubmitMapsSubmittedChildrenOntoEmptyData()
574574
$this->assertSame('Bernhard', $object['name']);
575575
}
576576

577-
public function requestMethodProvider()
577+
public static function requestMethodProvider()
578578
{
579579
return [
580580
['POST'],

Tests/Console/Descriptor/AbstractDescriptorTestCase.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function testDescribeOption(OptionsResolver $optionsResolver, array $opti
8080
}
8181
}
8282

83-
public function getDescribeDefaultsTestData()
83+
public static function getDescribeDefaultsTestData()
8484
{
8585
$options['core_types'] = ['Symfony\Component\Form\Extension\Core\Type\FormType'];
8686
$options['service_types'] = ['Symfony\Bridge\Doctrine\Form\Type\EntityType'];
@@ -96,7 +96,7 @@ public function getDescribeDefaultsTestData()
9696
yield [null, $options, 'types_with_deprecated_options'];
9797
}
9898

99-
public function getDescribeResolvedFormTypeTestData()
99+
public static function getDescribeResolvedFormTypeTestData()
100100
{
101101
$typeExtensions = [new FormTypeCsrfExtension(new CsrfTokenManager())];
102102
$parent = new ResolvedFormType(new FormType(), $typeExtensions);
@@ -106,7 +106,7 @@ public function getDescribeResolvedFormTypeTestData()
106106
yield [new ResolvedFormType(new FooType(), [], $parent), ['decorated' => false, 'show_deprecated' => true], 'deprecated_options_of_type'];
107107
}
108108

109-
public function getDescribeOptionTestData()
109+
public static function getDescribeOptionTestData()
110110
{
111111
$parent = new ResolvedFormType(new FormType());
112112
$options['decorated'] = false;

Tests/DependencyInjection/FormPassTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public function testAddTaggedTypeExtensions(array $extensions, array $expectedRe
118118
$this->assertEquals($expectedRegisteredExtensions, $extDefinition->getArgument(1));
119119
}
120120

121-
public function addTaggedTypeExtensionsDataProvider()
121+
public static function addTaggedTypeExtensionsDataProvider()
122122
{
123123
return [
124124
[
@@ -275,7 +275,7 @@ public function testPrivateTaggedServices($id, $class, $tagName, callable $asser
275275
$assertion($container);
276276
}
277277

278-
public function privateTaggedServicesProvider()
278+
public static function privateTaggedServicesProvider()
279279
{
280280
return [
281281
[

Tests/Extension/Core/DataMapper/DataMapperTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ public function testMapFormsToDataDoesNotChangeEqualDateTimeInstance($date)
351351
self::assertSame($publishedAtValue, $article['publishedAt']);
352352
}
353353

354-
public function provideDate(): array
354+
public static function provideDate(): array
355355
{
356356
return [
357357
[new \DateTime()],

0 commit comments

Comments
 (0)