Added regression test for AccountStatusException behavior (ref #36822)
This commit is contained in:
parent
8f2c68fc60
commit
08fbfcf5a0
@ -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();
|
||||
|
Reference in New Issue
Block a user