@@ -66,7 +66,7 @@ public function testCreateLogsTheUserInAndRedirectToHome(): void
6666 $ password = $ this ->fake ('password ' );
6767 $ user = UserFactory::create ([
6868 'email ' => $ email ,
69- 'password_hash ' => password_hash ($ password, PASSWORD_BCRYPT ),
69+ 'password_hash ' => models \User:: passwordHash ($ password ),
7070 ]);
7171
7272 $ current_user = auth \CurrentUser::get ();
@@ -92,7 +92,7 @@ public function testCreateReturnsACookie(): void
9292 $ password = $ this ->fake ('password ' );
9393 $ user = UserFactory::create ([
9494 'email ' => $ email ,
95- 'password_hash ' => password_hash ($ password, PASSWORD_BCRYPT ),
95+ 'password_hash ' => models \User:: passwordHash ($ password ),
9696 ]);
9797
9898 $ response = $ this ->appRun ('POST ' , '/login ' , [
@@ -121,7 +121,7 @@ public function testCreateCreatesASessionValidForOneMonth(): void
121121 $ password = $ this ->fake ('password ' );
122122 $ user = UserFactory::create ([
123123 'email ' => $ email ,
124- 'password_hash ' => password_hash ($ password, PASSWORD_BCRYPT ),
124+ 'password_hash ' => models \User:: passwordHash ($ password ),
125125 ]);
126126
127127 $ this ->assertSame (0 , models \Session::count ());
@@ -165,7 +165,7 @@ public function testCreateDoesNotCreateASessionIfConnected(): void
165165 $ password = $ this ->fake ('password ' );
166166 $ user = $ this ->login ([
167167 'email ' => $ email ,
168- 'password_hash ' => password_hash ($ password, PASSWORD_BCRYPT ),
168+ 'password_hash ' => models \User:: passwordHash ($ password ),
169169 ]);
170170
171171 $ number_tokens = models \Session::count ();
@@ -188,7 +188,7 @@ public function testCreateRedirectsToRedirectTo(): void
188188 $ password = $ this ->fake ('password ' );
189189 $ user = UserFactory::create ([
190190 'email ' => $ email ,
191- 'password_hash ' => password_hash ($ password, PASSWORD_BCRYPT ),
191+ 'password_hash ' => models \User:: passwordHash ($ password ),
192192 ]);
193193
194194 $ response = $ this ->appRun ('POST ' , '/login ' , [
@@ -209,7 +209,7 @@ public function testCreateForcesRedirectionOnCurrentInstance(): void
209209 $ password = $ this ->fake ('password ' );
210210 $ user = UserFactory::create ([
211211 'email ' => $ email ,
212- 'password_hash ' => password_hash ($ password, PASSWORD_BCRYPT ),
212+ 'password_hash ' => models \User:: passwordHash ($ password ),
213213 ]);
214214 $ redirect_to = 'https://example.com/about ' ;
215215
@@ -231,7 +231,7 @@ public function testCreateIsCaseInsensitive(): void
231231 $ password = $ this ->fake ('password ' );
232232 $ user = UserFactory::create ([
233233 'email ' => strtolower ($ email ),
234- 'password_hash ' => password_hash ($ password, PASSWORD_BCRYPT ),
234+ 'password_hash ' => models \User:: passwordHash ($ password ),
235235 ]);
236236
237237 $ current_user = auth \CurrentUser::get ();
@@ -257,7 +257,7 @@ public function testCreateFailsIfCsrfIsInvalid(): void
257257 $ password = $ this ->fake ('password ' );
258258 $ user = UserFactory::create ([
259259 'email ' => $ email ,
260- 'password_hash ' => password_hash ($ password, PASSWORD_BCRYPT ),
260+ 'password_hash ' => models \User:: passwordHash ($ password ),
261261 ]);
262262
263263 $ response = $ this ->appRun ('POST ' , '/login ' , [
@@ -279,7 +279,7 @@ public function testCreateFailsIfEmailDoesNotMatchAUser(): void
279279 $ password = $ this ->fake ('password ' );
280280 $ user = UserFactory::create ([
281281 'email ' => $ email ,
282- 'password_hash ' => password_hash ($ password, PASSWORD_BCRYPT ),
282+ 'password_hash ' => models \User:: passwordHash ($ password ),
283283 ]);
284284
285285 $ response = $ this ->appRun ('POST ' , '/login ' , [
@@ -300,7 +300,7 @@ public function testCreateFailsIfEmailIsSupportUserEmail(): void
300300 $ password = $ this ->fake ('password ' );
301301 $ user = UserFactory::create ([
302302 'email ' => $ email ,
303- 'password_hash ' => password_hash ($ password, PASSWORD_BCRYPT ),
303+ 'password_hash ' => models \User:: passwordHash ($ password ),
304304 ]);
305305
306306 $ response = $ this ->appRun ('POST ' , '/login ' , [
@@ -322,7 +322,7 @@ public function testCreateFailsIfEmailIsInvalid(): void
322322 $ password = $ this ->fake ('password ' );
323323 $ user = UserFactory::create ([
324324 'email ' => $ email ,
325- 'password_hash ' => password_hash ($ password, PASSWORD_BCRYPT ),
325+ 'password_hash ' => models \User:: passwordHash ($ password ),
326326 ]);
327327
328328 $ response = $ this ->appRun ('POST ' , '/login ' , [
@@ -344,7 +344,7 @@ public function testCreateFailsIfPasswordDoesNotMatch(): void
344344 $ password = $ this ->fake ('password ' );
345345 $ user = UserFactory::create ([
346346 'email ' => $ email ,
347- 'password_hash ' => password_hash ($ password, PASSWORD_BCRYPT ),
347+ 'password_hash ' => models \User:: passwordHash ($ password ),
348348 ]);
349349
350350 $ response = $ this ->appRun ('POST ' , '/login ' , [
0 commit comments