@@ -79,7 +79,7 @@ public function testAuthenticateWhenProviderDoesNotReturnAnUserInterface()
7979
8080 public function testAuthenticateWhenPreChecksFails ()
8181 {
82- $ this ->expectException (' Symfony\Component\Security\Core\Exception\CredentialsExpiredException ' );
82+ $ this ->expectException (BadCredentialsException::class );
8383 $ userChecker = $ this ->getMockBuilder ('Symfony\Component\Security\Core\User\UserCheckerInterface ' )->getMock ();
8484 $ userChecker ->expects ($ this ->once ())
8585 ->method ('checkPreAuth ' )
@@ -97,7 +97,7 @@ public function testAuthenticateWhenPreChecksFails()
9797
9898 public function testAuthenticateWhenPostChecksFails ()
9999 {
100- $ this ->expectException (' Symfony\Component\Security\Core\Exception\AccountExpiredException ' );
100+ $ this ->expectException (BadCredentialsException::class );
101101 $ userChecker = $ this ->getMockBuilder ('Symfony\Component\Security\Core\User\UserCheckerInterface ' )->getMock ();
102102 $ userChecker ->expects ($ this ->once ())
103103 ->method ('checkPostAuth ' )
@@ -116,15 +116,15 @@ public function testAuthenticateWhenPostChecksFails()
116116 public function testAuthenticateWhenPostCheckAuthenticationFails ()
117117 {
118118 $ this ->expectException ('Symfony\Component\Security\Core\Exception\BadCredentialsException ' );
119- $ this ->expectExceptionMessage ('Bad credentials ' );
119+ $ this ->expectExceptionMessage ('Bad credentials. ' );
120120 $ provider = $ this ->getProvider ();
121121 $ provider ->expects ($ this ->once ())
122122 ->method ('retrieveUser ' )
123123 ->willReturn ($ this ->getMockBuilder ('Symfony\Component\Security\Core\User\UserInterface ' )->getMock ())
124124 ;
125125 $ provider ->expects ($ this ->once ())
126126 ->method ('checkAuthentication ' )
127- ->willThrowException (new BadCredentialsException ())
127+ ->willThrowException (new CredentialsExpiredException ())
128128 ;
129129
130130 $ provider ->authenticate ($ this ->getSupportedToken ());
0 commit comments