diff --git a/src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationProviderManagerTest.php b/src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationProviderManagerTest.php index edc1897914..3e1910a1b0 100644 --- a/src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationProviderManagerTest.php +++ b/src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationProviderManagerTest.php @@ -54,10 +54,16 @@ class AuthenticationProviderManagerTest extends TestCase public function testAuthenticateWhenProviderReturnsAccountStatusException() { + $secondAuthenticationProvider = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Provider\AuthenticationProviderInterface')->getMock(); + $manager = new AuthenticationProviderManager([ $this->getAuthenticationProvider(true, null, 'Symfony\Component\Security\Core\Exception\AccountStatusException'), + $secondAuthenticationProvider, ]); + // AccountStatusException stops authentication + $secondAuthenticationProvider->expects($this->never())->method('supports'); + try { $manager->authenticate($token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock()); $this->fail();