Skip to content
This repository was archived by the owner on May 31, 2024. It is now read-only.

Commit 79b1d65

Browse files
[Security/Http] Fix test relying on a private property
1 parent 7ab68c8 commit 79b1d65

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Http/Tests/Firewall/AnonymousAuthenticationListenerTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,9 @@ public function testHandleWithContextHavingNoToken()
5454
$authenticationManager
5555
->expects($this->once())
5656
->method('authenticate')
57-
->with(self::logicalAnd(
58-
$this->isInstanceOf('Symfony\Component\Security\Core\Authentication\Token\AnonymousToken'),
59-
$this->attributeEqualTo('key', 'TheKey')
60-
))
57+
->with($this->callback(function ($token) {
58+
return 'TheKey' === $token->getKey();
59+
}))
6160
->will($this->returnValue($anonymousToken))
6261
;
6362

0 commit comments

Comments
 (0)