@@ -116,7 +116,7 @@ public function testAuthenticated(): void
116116 ;
117117
118118 $ this ->router
119- ->method ('generate ' )
119+ ->expects ( self :: once ())-> method ('generate ' )
120120 ->with ('sonata_admin_dashboard ' )
121121 ->willReturn ('/foo ' )
122122 ;
@@ -136,7 +136,7 @@ public function testUnknownToken(): void
136136 $ request = new Request ();
137137
138138 $ this ->userManager
139- ->method ('findUserByConfirmationToken ' )
139+ ->expects ( self :: once ())-> method ('findUserByConfirmationToken ' )
140140 ->with ('token ' )
141141 ->willReturn (null )
142142 ;
@@ -156,13 +156,13 @@ public function testPasswordRequestNonExpired(): void
156156 ;
157157
158158 $ this ->userManager
159- ->method ('findUserByConfirmationToken ' )
159+ ->expects ( self :: once ())-> method ('findUserByConfirmationToken ' )
160160 ->with ('token ' )
161161 ->willReturn ($ user )
162162 ;
163163
164164 $ this ->router
165- ->method ('generate ' )
165+ ->expects ( self :: once ())-> method ('generate ' )
166166 ->with ('nucleos_user_admin_resetting_request ' )
167167 ->willReturn ('/foo ' )
168168 ;
@@ -198,13 +198,13 @@ public function testReset(): void
198198 ->method ('isSubmitted ' )
199199 ->willReturn (false )
200200 ;
201- $ form-> expects ( self :: once ())
202- ->method ('createView ' )
201+ $ form
202+ ->expects ( self :: once ())-> method ('createView ' )
203203 ->willReturn ($ view )
204204 ;
205205
206206 $ this ->userManager
207- ->method ('findUserByConfirmationToken ' )
207+ ->expects ( self :: once ())-> method ('findUserByConfirmationToken ' )
208208 ->with ('user-token ' )
209209 ->willReturn ($ user )
210210 ;
@@ -215,13 +215,13 @@ public function testReset(): void
215215 ;
216216
217217 $ this ->router
218- ->method ('generate ' )
218+ ->expects ( self :: once ())-> method ('generate ' )
219219 ->with ('nucleos_user_admin_security_check ' )
220220 ->willReturn ('/check ' )
221221 ;
222222
223223 $ this ->templating
224- ->method ('render ' )
224+ ->expects ( self :: once ())-> method ('render ' )
225225 ->with ('@NucleosUserAdmin/Admin/Security/Resetting/reset.html.twig ' , [
226226 'token ' => 'user-token ' ,
227227 'form ' => $ view ,
@@ -232,7 +232,7 @@ public function testReset(): void
232232 ;
233233
234234 $ this ->templateRegistry
235- ->method ('getTemplate ' )
235+ ->expects ( self :: once ())-> method ('getTemplate ' )
236236 ->with ('layout ' )
237237 ->willReturn ('base.html.twig ' )
238238 ;
@@ -255,19 +255,19 @@ public function testPostedReset(): void
255255 ->method ('isPasswordRequestNonExpired ' )
256256 ->willReturn (true )
257257 ;
258- $ user-> expects ( self :: once ())
259- ->method ('setLastLogin ' )
258+ $ user
259+ ->expects ( self :: once ())-> method ('setLastLogin ' )
260260 ;
261- $ user-> expects ( self :: once ())
262- ->method ('setConfirmationToken ' )
261+ $ user
262+ ->expects ( self :: once ())-> method ('setConfirmationToken ' )
263263 ->with (null )
264264 ;
265- $ user-> expects ( self :: once ())
266- ->method ('setPasswordRequestedAt ' )
265+ $ user
266+ ->expects ( self :: once ())-> method ('setPasswordRequestedAt ' )
267267 ->with (null )
268268 ;
269- $ user-> expects ( self :: once ())
270- ->method ('setEnabled ' )
269+ $ user
270+ ->expects ( self :: once ())-> method ('setEnabled ' )
271271 ->with (true )
272272 ;
273273
@@ -291,8 +291,8 @@ static function (string $message): string {
291291 ;
292292
293293 $ bag = $ this ->createMock (FlashBag::class);
294- $ bag-> expects ( self :: once ())
295- ->method ('add ' )
294+ $ bag
295+ ->expects ( self :: once ())-> method ('add ' )
296296 ->with ('success ' , 'resetting.flash.success ' )
297297 ;
298298
@@ -302,22 +302,22 @@ static function (string $message): string {
302302 ;
303303
304304 $ this ->userManager
305- ->method ('findUserByConfirmationToken ' )
305+ ->expects ( self :: once ())-> method ('findUserByConfirmationToken ' )
306306 ->with ('token ' )
307307 ->willReturn ($ user )
308308 ;
309- $ this ->userManager -> expects ( self :: once ())
310- ->method ('updateUser ' )
309+ $ this ->userManager
310+ ->expects ( self :: once ())-> method ('updateUser ' )
311311 ->with ($ user )
312312 ;
313313
314- $ this ->loginManager -> expects ( self :: once ())
315- ->method ('logInUser ' )
314+ $ this ->loginManager
315+ ->expects ( self :: once ())-> method ('logInUser ' )
316316 ->with ('default ' , $ user , self ::isInstanceOf (Response::class))
317317 ;
318318
319- $ this ->formFactory -> expects ( self :: once ())
320- ->method ('create ' )
319+ $ this ->formFactory
320+ ->expects ( self :: once ())-> method ('create ' )
321321 ->willReturn ($ form )
322322 ;
323323
0 commit comments