Skip to content

Commit 24d8cde

Browse files
committed
Added regression test for AccountStatusException behavior (ref #36822)
1 parent d8d0624 commit 24d8cde

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Tests/Authentication/AuthenticationProviderManagerTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,16 @@ public function testAuthenticateWhenNoProviderSupportsToken()
5454

5555
public function testAuthenticateWhenProviderReturnsAccountStatusException()
5656
{
57+
$secondAuthenticationProvider = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Provider\AuthenticationProviderInterface')->getMock();
58+
5759
$manager = new AuthenticationProviderManager([
5860
$this->getAuthenticationProvider(true, null, 'Symfony\Component\Security\Core\Exception\AccountStatusException'),
61+
$secondAuthenticationProvider,
5962
]);
6063

64+
// AccountStatusException stops authentication
65+
$secondAuthenticationProvider->expects($this->never())->method('supports');
66+
6167
try {
6268
$manager->authenticate($token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock());
6369
$this->fail();

0 commit comments

Comments
 (0)