Skip to content

Commit e33f4ae

Browse files
Merge branch '5.4' into 6.2
* 5.4: Migrate to `static` data providers using `rector/rector`
2 parents 837f6c4 + 4112393 commit e33f4ae

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

Tests/Authorization/AuthorizationCheckerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function testIsGranted($decide)
5757
$this->assertSame($decide, $this->authorizationChecker->isGranted('ROLE_FOO'));
5858
}
5959

60-
public function isGrantedProvider()
60+
public static function isGrantedProvider()
6161
{
6262
return [[true], [false]];
6363
}

Tests/Authorization/Voter/RoleHierarchyVoterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function testVoteUsingTokenThatReturnsRoleNames($roles, $attributes, $exp
2727
$this->assertSame($expected, $voter->vote($this->getTokenWithRoleNames($roles), null, $attributes));
2828
}
2929

30-
public function getVoteTests()
30+
public static function getVoteTests()
3131
{
3232
return array_merge(parent::getVoteTests(), [
3333
[['ROLE_FOO'], ['ROLE_FOOBAR'], VoterInterface::ACCESS_GRANTED],
@@ -44,7 +44,7 @@ public function testVoteWithEmptyHierarchyUsingTokenThatReturnsRoleNames($roles,
4444
$this->assertSame($expected, $voter->vote($this->getTokenWithRoleNames($roles), null, $attributes));
4545
}
4646

47-
public function getVoteWithEmptyHierarchyTests()
47+
public static function getVoteWithEmptyHierarchyTests()
4848
{
4949
return parent::getVoteTests();
5050
}

Tests/Authorization/Voter/RoleVoterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function testVoteUsingTokenThatReturnsRoleNames($roles, $attributes, $exp
3030
$this->assertSame($expected, $voter->vote($this->getTokenWithRoleNames($roles), null, $attributes));
3131
}
3232

33-
public function getVoteTests()
33+
public static function getVoteTests()
3434
{
3535
return [
3636
[[], [], VoterInterface::ACCESS_ABSTAIN],
@@ -56,7 +56,7 @@ public function testSupportsAttribute(string $prefix, string $attribute, bool $e
5656
$this->assertSame($expected, $voter->supportsAttribute($attribute));
5757
}
5858

59-
public function provideAttributes()
59+
public static function provideAttributes()
6060
{
6161
yield ['ROLE_', 'ROLE_foo', true];
6262
yield ['ROLE_', 'ROLE_', true];

Tests/Resources/TranslationFilesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function testTranslationFileIsValidWithoutEntityLoader($filePath)
4242
$this->assertCount(0, $errors, sprintf('"%s" is invalid:%s', $filePath, \PHP_EOL.implode(\PHP_EOL, array_column($errors, 'message'))));
4343
}
4444

45-
public function provideTranslationFiles()
45+
public static function provideTranslationFiles()
4646
{
4747
return array_map(
4848
function ($filePath) { return (array) $filePath; },

Tests/Validator/Constraints/UserPasswordTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function testValidatedByService(UserPassword $constraint)
3333
self::assertSame('my_service', $constraint->validatedBy());
3434
}
3535

36-
public function provideServiceValidatedConstraints(): iterable
36+
public static function provideServiceValidatedConstraints(): iterable
3737
{
3838
yield 'Doctrine style' => [new UserPassword(['service' => 'my_service'])];
3939

Tests/Validator/Constraints/UserPasswordValidatorTestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function testPasswordIsNotValid(UserPassword $constraint)
9191
->assertRaised();
9292
}
9393

94-
public function provideConstraints(): iterable
94+
public static function provideConstraints(): iterable
9595
{
9696
yield 'Doctrine style' => [new UserPassword(['message' => 'myMessage'])];
9797

@@ -113,7 +113,7 @@ public function testEmptyPasswordsAreNotValid($password)
113113
->assertRaised();
114114
}
115115

116-
public function emptyPasswordData()
116+
public static function emptyPasswordData()
117117
{
118118
return [
119119
[null],

0 commit comments

Comments
 (0)