@@ -26,9 +26,9 @@ public function testHandleWithValidValues()
26
26
27
27
$ request = new Request ([], [], [], [], [], []);
28
28
29
- $ token = $ this ->getMockBuilder (' Symfony\Component\Security\Core\Authentication\Token\TokenInterface ' )->getMock ();
29
+ $ token = $ this ->getMockBuilder (\ Symfony \Component \Security \Core \Authentication \Token \TokenInterface::class )->getMock ();
30
30
31
- $ tokenStorage = $ this ->getMockBuilder (' Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface ' )->getMock ();
31
+ $ tokenStorage = $ this ->getMockBuilder (\ Symfony \Component \Security \Core \Authentication \Token \Storage \TokenStorageInterface::class )->getMock ();
32
32
$ tokenStorage
33
33
->expects ($ this ->any ())
34
34
->method ('getToken ' )
@@ -40,15 +40,15 @@ public function testHandleWithValidValues()
40
40
->with ($ this ->equalTo ($ token ))
41
41
;
42
42
43
- $ authenticationManager = $ this ->getMockBuilder (' Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface ' )->getMock ();
43
+ $ authenticationManager = $ this ->getMockBuilder (\ Symfony \Component \Security \Core \Authentication \AuthenticationManagerInterface::class )->getMock ();
44
44
$ authenticationManager
45
45
->expects ($ this ->once ())
46
46
->method ('authenticate ' )
47
- ->with ($ this ->isInstanceOf (' Symfony\Component\Security\Core\Authentication\Token\ PreAuthenticatedToken' ))
47
+ ->with ($ this ->isInstanceOf (PreAuthenticatedToken::class ))
48
48
->willReturn ($ token )
49
49
;
50
50
51
- $ listener = $ this ->getMockForAbstractClass (' Symfony\Component\Security\Http\Firewall\AbstractPreAuthenticatedListener ' , [
51
+ $ listener = $ this ->getMockForAbstractClass (\ Symfony \Component \Security \Http \Firewall \AbstractPreAuthenticatedListener::class , [
52
52
$ tokenStorage ,
53
53
$ authenticationManager ,
54
54
'TheProviderKey ' ,
@@ -74,7 +74,7 @@ public function testHandleWhenAuthenticationFails()
74
74
75
75
$ request = new Request ([], [], [], [], [], []);
76
76
77
- $ tokenStorage = $ this ->getMockBuilder (' Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface ' )->getMock ();
77
+ $ tokenStorage = $ this ->getMockBuilder (\ Symfony \Component \Security \Core \Authentication \Token \Storage \TokenStorageInterface::class )->getMock ();
78
78
$ tokenStorage
79
79
->expects ($ this ->any ())
80
80
->method ('getToken ' )
@@ -86,15 +86,15 @@ public function testHandleWhenAuthenticationFails()
86
86
;
87
87
88
88
$ exception = new AuthenticationException ('Authentication failed. ' );
89
- $ authenticationManager = $ this ->getMockBuilder (' Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface ' )->getMock ();
89
+ $ authenticationManager = $ this ->getMockBuilder (\ Symfony \Component \Security \Core \Authentication \AuthenticationManagerInterface::class )->getMock ();
90
90
$ authenticationManager
91
91
->expects ($ this ->once ())
92
92
->method ('authenticate ' )
93
- ->with ($ this ->isInstanceOf (' Symfony\Component\Security\Core\Authentication\Token\ PreAuthenticatedToken' ))
93
+ ->with ($ this ->isInstanceOf (PreAuthenticatedToken::class ))
94
94
->willThrowException ($ exception )
95
95
;
96
96
97
- $ listener = $ this ->getMockForAbstractClass (' Symfony\Component\Security\Http\Firewall\AbstractPreAuthenticatedListener ' , [
97
+ $ listener = $ this ->getMockForAbstractClass (\ Symfony \Component \Security \Http \Firewall \AbstractPreAuthenticatedListener::class , [
98
98
$ tokenStorage ,
99
99
$ authenticationManager ,
100
100
'TheProviderKey ' ,
@@ -122,7 +122,7 @@ public function testHandleWhenAuthenticationFailsWithDifferentToken()
122
122
123
123
$ request = new Request ([], [], [], [], [], []);
124
124
125
- $ tokenStorage = $ this ->getMockBuilder (' Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface ' )->getMock ();
125
+ $ tokenStorage = $ this ->getMockBuilder (\ Symfony \Component \Security \Core \Authentication \Token \Storage \TokenStorageInterface::class )->getMock ();
126
126
$ tokenStorage
127
127
->expects ($ this ->any ())
128
128
->method ('getToken ' )
@@ -134,15 +134,15 @@ public function testHandleWhenAuthenticationFailsWithDifferentToken()
134
134
;
135
135
136
136
$ exception = new AuthenticationException ('Authentication failed. ' );
137
- $ authenticationManager = $ this ->getMockBuilder (' Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface ' )->getMock ();
137
+ $ authenticationManager = $ this ->getMockBuilder (\ Symfony \Component \Security \Core \Authentication \AuthenticationManagerInterface::class )->getMock ();
138
138
$ authenticationManager
139
139
->expects ($ this ->once ())
140
140
->method ('authenticate ' )
141
- ->with ($ this ->isInstanceOf (' Symfony\Component\Security\Core\Authentication\Token\ PreAuthenticatedToken' ))
141
+ ->with ($ this ->isInstanceOf (PreAuthenticatedToken::class ))
142
142
->willThrowException ($ exception )
143
143
;
144
144
145
- $ listener = $ this ->getMockForAbstractClass (' Symfony\Component\Security\Http\Firewall\AbstractPreAuthenticatedListener ' , [
145
+ $ listener = $ this ->getMockForAbstractClass (\ Symfony \Component \Security \Http \Firewall \AbstractPreAuthenticatedListener::class , [
146
146
$ tokenStorage ,
147
147
$ authenticationManager ,
148
148
'TheProviderKey ' ,
@@ -170,20 +170,20 @@ public function testHandleWithASimilarAuthenticatedToken()
170
170
171
171
$ token = new PreAuthenticatedToken ('TheUser ' , 'TheCredentials ' , 'TheProviderKey ' , ['ROLE_FOO ' ]);
172
172
173
- $ tokenStorage = $ this ->getMockBuilder (' Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface ' )->getMock ();
173
+ $ tokenStorage = $ this ->getMockBuilder (\ Symfony \Component \Security \Core \Authentication \Token \Storage \TokenStorageInterface::class )->getMock ();
174
174
$ tokenStorage
175
175
->expects ($ this ->any ())
176
176
->method ('getToken ' )
177
177
->willReturn ($ token )
178
178
;
179
179
180
- $ authenticationManager = $ this ->getMockBuilder (' Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface ' )->getMock ();
180
+ $ authenticationManager = $ this ->getMockBuilder (\ Symfony \Component \Security \Core \Authentication \AuthenticationManagerInterface::class )->getMock ();
181
181
$ authenticationManager
182
182
->expects ($ this ->never ())
183
183
->method ('authenticate ' )
184
184
;
185
185
186
- $ listener = $ this ->getMockForAbstractClass (' Symfony\Component\Security\Http\Firewall\AbstractPreAuthenticatedListener ' , [
186
+ $ listener = $ this ->getMockForAbstractClass (\ Symfony \Component \Security \Http \Firewall \AbstractPreAuthenticatedListener::class , [
187
187
$ tokenStorage ,
188
188
$ authenticationManager ,
189
189
'TheProviderKey ' ,
@@ -211,7 +211,7 @@ public function testHandleWithAnInvalidSimilarToken()
211
211
212
212
$ token = new PreAuthenticatedToken ('AnotherUser ' , 'TheCredentials ' , 'TheProviderKey ' , ['ROLE_FOO ' ]);
213
213
214
- $ tokenStorage = $ this ->getMockBuilder (' Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface ' )->getMock ();
214
+ $ tokenStorage = $ this ->getMockBuilder (\ Symfony \Component \Security \Core \Authentication \Token \Storage \TokenStorageInterface::class )->getMock ();
215
215
$ tokenStorage
216
216
->expects ($ this ->any ())
217
217
->method ('getToken ' )
@@ -224,15 +224,15 @@ public function testHandleWithAnInvalidSimilarToken()
224
224
;
225
225
226
226
$ exception = new AuthenticationException ('Authentication failed. ' );
227
- $ authenticationManager = $ this ->getMockBuilder (' Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface ' )->getMock ();
227
+ $ authenticationManager = $ this ->getMockBuilder (\ Symfony \Component \Security \Core \Authentication \AuthenticationManagerInterface::class )->getMock ();
228
228
$ authenticationManager
229
229
->expects ($ this ->once ())
230
230
->method ('authenticate ' )
231
- ->with ($ this ->isInstanceOf (' Symfony\Component\Security\Core\Authentication\Token\ PreAuthenticatedToken' ))
231
+ ->with ($ this ->isInstanceOf (PreAuthenticatedToken::class ))
232
232
->willThrowException ($ exception )
233
233
;
234
234
235
- $ listener = $ this ->getMockForAbstractClass (' Symfony\Component\Security\Http\Firewall\AbstractPreAuthenticatedListener ' , [
235
+ $ listener = $ this ->getMockForAbstractClass (\ Symfony \Component \Security \Http \Firewall \AbstractPreAuthenticatedListener::class , [
236
236
$ tokenStorage ,
237
237
$ authenticationManager ,
238
238
'TheProviderKey ' ,
0 commit comments