@@ -110,13 +110,13 @@ public function testAuthentication(): void
110110 ->expects ($ this ->exactly (2 ))
111111 ->method ('findOneBy ' )
112112 ->with ($ this ->equalTo (['username ' => 'a username ' ]))
113- ->will ( $ this -> returnValue ( $ entity) );
113+ ->willReturn ( $ entity );
114114
115115 $ objectManager = $ this ->createMock (ObjectManager::class);
116116 $ objectManager ->expects ($ this ->exactly (2 ))
117117 ->method ('getRepository ' )
118118 ->with ($ this ->equalTo (IdentityObject::class))
119- ->will ( $ this -> returnValue ( $ objectRepository) );
119+ ->willReturn ( $ objectRepository );
120120
121121 $ adapter = new ObjectRepositoryAdapter ();
122122 $ adapter ->setOptions ([
@@ -138,7 +138,7 @@ public function testAuthentication(): void
138138 $ result ->getIdentity (),
139139 );
140140
141- $ method ->will ( $ this -> returnValue ( null ) );
141+ $ method ->willReturn ( null );
142142
143143 $ result = $ adapter ->authenticate ();
144144
@@ -156,7 +156,7 @@ public function testAuthenticationWithPublicProperties(): void
156156 ->expects ($ this ->exactly (2 ))
157157 ->method ('findOneBy ' )
158158 ->with ($ this ->equalTo (['username ' => 'a username ' ]))
159- ->will ( $ this -> returnValue ( $ entity) );
159+ ->willReturn ( $ entity );
160160
161161 $ adapter = new ObjectRepositoryAdapter ();
162162 $ adapter ->setOptions ([
@@ -173,7 +173,7 @@ public function testAuthenticationWithPublicProperties(): void
173173
174174 $ this ->assertTrue ($ result ->isValid ());
175175
176- $ method ->will ( $ this -> returnValue ( null ) );
176+ $ method ->willReturn ( null );
177177
178178 $ result = $ adapter ->authenticate ();
179179
@@ -189,7 +189,7 @@ public function testWillRefuseToAuthenticateWithoutGettersOrPublicMethods(): voi
189189 ->expects ($ this ->once ())
190190 ->method ('findOneBy ' )
191191 ->with ($ this ->equalTo (['username ' => 'a username ' ]))
192- ->will ( $ this -> returnValue ( new stdClass () ));
192+ ->willReturn ( new stdClass ());
193193
194194 $ adapter = new ObjectRepositoryAdapter ();
195195 $ adapter ->setOptions ([
@@ -216,7 +216,7 @@ public function testCanValidateWithSpecialCrypt(): void
216216 ->expects ($ this ->exactly (2 ))
217217 ->method ('findOneBy ' )
218218 ->with ($ this ->equalTo (['username ' => 'username ' ]))
219- ->will ( $ this -> returnValue ( $ entity) );
219+ ->willReturn ( $ entity );
220220
221221 $ adapter = new ObjectRepositoryAdapter ();
222222 $ adapter ->setOptions ([
@@ -249,7 +249,7 @@ public function testWillRefuseToAuthenticateWhenInvalidInstanceIsFound(): void
249249 ->expects ($ this ->once ())
250250 ->method ('findOneBy ' )
251251 ->with ($ this ->equalTo (['username ' => 'a username ' ]))
252- ->will ( $ this -> returnValue ( new stdClass () ));
252+ ->willReturn ( new stdClass ());
253253
254254 $ adapter = new ObjectRepositoryAdapter ();
255255 $ adapter ->setOptions ([
@@ -283,7 +283,7 @@ public function testWillNotCastAuthCredentialValue(): void
283283 ->expects ($ this ->once ())
284284 ->method ('findOneBy ' )
285285 ->with ($ this ->equalTo (['username ' => 'a username ' ]))
286- ->will ( $ this -> returnValue ( $ entity) );
286+ ->willReturn ( $ entity );
287287
288288 $ this ->assertFalse ($ adapter ->authenticate ()->isValid ());
289289 }
0 commit comments