@@ -159,7 +159,7 @@ public function test_config_callback_attribute_handler()
159159
160160 $ this ->test_auth_passes ();
161161
162- $ user = \ Auth::user ();
162+ $ user = Auth::user ();
163163
164164 $ this ->assertEquals ('handled ' , $ user ->name );
165165 }
@@ -257,9 +257,17 @@ public function test_config_password_sync_enabled()
257257
258258 $ this ->getMockAuth ()->shouldReceive ('attempt ' )->once ()->andReturn (true );
259259
260- $ this ->assertTrue (Auth::attempt (['email ' => 'jdoe@email.com ' , 'password ' => '12345 ' ]));
260+ $ email = 'joe@email.com ' ;
261+ $ password = '12345 ' ;
262+
263+ $ this ->assertTrue (Auth::attempt (compact ('email ' , 'password ' )));
264+
265+ $ user = EloquentUser::first ();
266+
267+ $ this ->assertInstanceOf (EloquentUser::class, $ user );
261268
262- $ this ->assertInstanceOf (EloquentUser::class, EloquentUser::first ());
269+ // This check will pass due to password synchronization being enabled.
270+ $ this ->assertTrue (Hash::check ($ password , $ user ->password ));
263271 }
264272
265273 public function test_config_password_sync_disabled ()
@@ -268,9 +276,17 @@ public function test_config_password_sync_disabled()
268276
269277 $ this ->getMockAuth ()->shouldReceive ('attempt ' )->once ()->andReturn (true );
270278
271- $ this ->assertTrue (Auth::attempt (['email ' => 'jdoe@email.com ' , 'password ' => '12345 ' ]));
279+ $ email = 'joe@email.com ' ;
280+ $ password = '12345 ' ;
281+
282+ $ this ->assertTrue (Auth::attempt (compact ('email ' , 'password ' )));
283+
284+ $ user = EloquentUser::first ();
285+
286+ $ this ->assertInstanceOf (EloquentUser::class, $ user );
272287
273- $ this ->assertInstanceOf (EloquentUser::class, EloquentUser::first ());
288+ // This check will fail due to password synchronization being disabled.
289+ $ this ->assertFalse (Hash::check ($ password , $ user ->password ));
274290 }
275291
276292 protected function getMockAuth (User $ user = null )
0 commit comments