@@ -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 ;
@@ -204,7 +204,7 @@ public function testReset(): void
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 ;
@@ -259,15 +259,15 @@ public function testPostedReset(): void
259259 ->method ('setLastLogin ' )
260260 ;
261261 $ user ->expects (self ::once ())
262- ->method ('setConfirmationToken ' )
262+ ->expects ( self :: once ())-> method ('setConfirmationToken ' )
263263 ->with (null )
264264 ;
265265 $ user ->expects (self ::once ())
266- ->method ('setPasswordRequestedAt ' )
266+ ->expects ( self :: once ())-> method ('setPasswordRequestedAt ' )
267267 ->with (null )
268268 ;
269269 $ user ->expects (self ::once ())
270- ->method ('setEnabled ' )
270+ ->expects ( self :: once ())-> method ('setEnabled ' )
271271 ->with (true )
272272 ;
273273
@@ -292,7 +292,7 @@ static function (string $message): string {
292292
293293 $ bag = $ this ->createMock (FlashBag::class);
294294 $ bag ->expects (self ::once ())
295- ->method ('add ' )
295+ ->expects ( self :: once ())-> method ('add ' )
296296 ->with ('success ' , 'resetting.flash.success ' )
297297 ;
298298
@@ -302,17 +302,17 @@ 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 ;
309309 $ this ->userManager ->expects (self ::once ())
310- ->method ('updateUser ' )
310+ ->expects ( self :: once ())-> method ('updateUser ' )
311311 ->with ($ user )
312312 ;
313313
314314 $ this ->loginManager ->expects (self ::once ())
315- ->method ('logInUser ' )
315+ ->expects ( self :: once ())-> method ('logInUser ' )
316316 ->with ('default ' , $ user , self ::isInstanceOf (Response::class))
317317 ;
318318
0 commit comments