Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 30e2543

Browse filesBrowse files
minor #36829 [Security] Update test to test AccountStatusException behavior (wouterj)
This PR was merged into the 3.4 branch. Discussion ---------- [Security] Update test to test AccountStatusException behavior | Q | A | ------------- | --- | Branch? | 3.4 (behavior is this way since 2.0) | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - See #36822 This PR updates the `AccountStatusException` test to test the expected behavior of this exception (and its difference from `AuthenticationException`). Commits ------- 08fbfcf Added regression test for AccountStatusException behavior (ref #36822)
2 parents 8f2c68f + 08fbfcf commit 30e2543
Copy full SHA for 30e2543

File tree

Expand file treeCollapse file tree

1 file changed

+6
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-0
lines changed

‎src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationProviderManagerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationProviderManagerTest.php
+6Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.