@@ -115,7 +115,7 @@ public function testCheckAuthenticationWhenCredentialsAreEmpty()
115
115
->method ('isPasswordValid ' )
116
116
;
117
117
118
- $ provider = $ this ->getProvider (false , false , $ encoder );
118
+ $ provider = $ this ->getProvider (null , null , $ encoder );
119
119
$ method = new \ReflectionMethod ($ provider , 'checkAuthentication ' );
120
120
$ method ->setAccessible (true );
121
121
@@ -142,7 +142,7 @@ public function testCheckAuthenticationWhenCredentialsAre0()
142
142
->will ($ this ->returnValue (true ))
143
143
;
144
144
145
- $ provider = $ this ->getProvider (false , false , $ encoder );
145
+ $ provider = $ this ->getProvider (null , null , $ encoder );
146
146
$ method = new \ReflectionMethod ($ provider , 'checkAuthentication ' );
147
147
$ method ->setAccessible (true );
148
148
@@ -171,7 +171,7 @@ public function testCheckAuthenticationWhenCredentialsAreNotValid()
171
171
->will ($ this ->returnValue (false ))
172
172
;
173
173
174
- $ provider = $ this ->getProvider (false , false , $ encoder );
174
+ $ provider = $ this ->getProvider (null , null , $ encoder );
175
175
$ method = new \ReflectionMethod ($ provider , 'checkAuthentication ' );
176
176
$ method ->setAccessible (true );
177
177
@@ -206,7 +206,7 @@ public function testCheckAuthenticationDoesNotReauthenticateWhenPasswordHasChang
206
206
->will ($ this ->returnValue ('newFoo ' ))
207
207
;
208
208
209
- $ provider = $ this ->getProvider (false , false , null );
209
+ $ provider = $ this ->getProvider ();
210
210
$ reflection = new \ReflectionMethod ($ provider , 'checkAuthentication ' );
211
211
$ reflection ->setAccessible (true );
212
212
$ reflection ->invoke ($ provider , $ dbUser , $ token );
@@ -231,7 +231,7 @@ public function testCheckAuthenticationWhenTokenNeedsReauthenticationWorksWithou
231
231
->will ($ this ->returnValue ('foo ' ))
232
232
;
233
233
234
- $ provider = $ this ->getProvider (false , false , null );
234
+ $ provider = $ this ->getProvider ();
235
235
$ reflection = new \ReflectionMethod ($ provider , 'checkAuthentication ' );
236
236
$ reflection ->setAccessible (true );
237
237
$ reflection ->invoke ($ provider , $ dbUser , $ token );
@@ -245,7 +245,7 @@ public function testCheckAuthentication()
245
245
->will ($ this ->returnValue (true ))
246
246
;
247
247
248
- $ provider = $ this ->getProvider (false , false , $ encoder );
248
+ $ provider = $ this ->getProvider (null , null , $ encoder );
249
249
$ method = new \ReflectionMethod ($ provider , 'checkAuthentication ' );
250
250
$ method ->setAccessible (true );
251
251
@@ -270,17 +270,17 @@ protected function getSupportedToken()
270
270
return $ mock ;
271
271
}
272
272
273
- protected function getProvider ($ user = false , $ userChecker = false , $ passwordEncoder = null )
273
+ protected function getProvider ($ user = null , $ userChecker = null , $ passwordEncoder = null )
274
274
{
275
275
$ userProvider = $ this ->getMock ('Symfony \\Component \\Security \\Core \\User \\UserProviderInterface ' );
276
- if (false !== $ user ) {
276
+ if (null !== $ user ) {
277
277
$ userProvider ->expects ($ this ->once ())
278
278
->method ('loadUserByUsername ' )
279
279
->will ($ this ->returnValue ($ user ))
280
280
;
281
281
}
282
282
283
- if (false === $ userChecker ) {
283
+ if (null === $ userChecker ) {
284
284
$ userChecker = $ this ->getMock ('Symfony \\Component \\Security \\Core \\User \\UserCheckerInterface ' );
285
285
}
286
286
0 commit comments