@@ -32,16 +32,16 @@ public function testVoteWithTokenThatReturnsRoleNames($roles, $attributes, $expe
32
32
$ this ->assertSame ($ expected , $ voter ->vote ($ this ->getTokenWithRoleNames ($ roles , $ tokenExpectsGetRoles ), null , $ attributes ));
33
33
}
34
34
35
- public function getVoteTests ()
35
+ public static function getVoteTests ()
36
36
{
37
37
return [
38
38
[[], [], VoterInterface::ACCESS_ABSTAIN , false , false ],
39
39
[[], ['FOO ' ], VoterInterface::ACCESS_ABSTAIN , false , false ],
40
40
41
- [[], [$ this -> createExpression ()], VoterInterface::ACCESS_DENIED , true , false ],
41
+ [[], [self :: createExpression ()], VoterInterface::ACCESS_DENIED , true , false ],
42
42
43
- [['ROLE_FOO ' ], [$ this -> createExpression (), $ this -> createExpression ()], VoterInterface::ACCESS_GRANTED ],
44
- [['ROLE_BAR ' , 'ROLE_FOO ' ], [$ this -> createExpression ()], VoterInterface::ACCESS_GRANTED ],
43
+ [['ROLE_FOO ' ], [self :: createExpression (), self :: createExpression ()], VoterInterface::ACCESS_GRANTED ],
44
+ [['ROLE_BAR ' , 'ROLE_FOO ' ], [self :: createExpression ()], VoterInterface::ACCESS_GRANTED ],
45
45
];
46
46
}
47
47
@@ -81,8 +81,8 @@ protected function createAuthorizationChecker()
81
81
return $ this ->createMock (AuthorizationCheckerInterface::class);
82
82
}
83
83
84
- protected function createExpression ()
84
+ protected static function createExpression ()
85
85
{
86
- return $ this -> createMock ( Expression::class );
86
+ return new Expression ( '' );
87
87
}
88
88
}
0 commit comments