summaryrefslogtreecommitdiffstats
path: root/Http/Tests
diff options
context:
space:
mode:
authorNicolas Grekas <nicolas.grekas@gmail.com>2015-07-22 18:52:24 +0200
committerNicolas Grekas <nicolas.grekas@gmail.com>2015-07-22 23:35:10 +0200
commit79b1d65ad79a2650fdc6b2849604dc9fb9759c4a (patch)
tree58a8e4c9c76516838741954d1f6b95a2a396ed06 /Http/Tests
parent7ab68c8fe7a6bedf4f6302c027e96d9da47b6bd0 (diff)
downloadsymfony-security-79b1d65ad79a2650fdc6b2849604dc9fb9759c4a.zip
symfony-security-79b1d65ad79a2650fdc6b2849604dc9fb9759c4a.tar.gz
symfony-security-79b1d65ad79a2650fdc6b2849604dc9fb9759c4a.tar.bz2
[Security/Http] Fix test relying on a private property
Diffstat (limited to 'Http/Tests')
-rw-r--r--Http/Tests/Firewall/AnonymousAuthenticationListenerTest.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/Http/Tests/Firewall/AnonymousAuthenticationListenerTest.php b/Http/Tests/Firewall/AnonymousAuthenticationListenerTest.php
index 3bc4eb6..9af4791 100644
--- a/Http/Tests/Firewall/AnonymousAuthenticationListenerTest.php
+++ b/Http/Tests/Firewall/AnonymousAuthenticationListenerTest.php
@@ -54,10 +54,9 @@ class AnonymousAuthenticationListenerTest extends \PHPUnit_Framework_TestCase
$authenticationManager
->expects($this->once())
->method('authenticate')
- ->with(self::logicalAnd(
- $this->isInstanceOf('Symfony\Component\Security\Core\Authentication\Token\AnonymousToken'),
- $this->attributeEqualTo('key', 'TheKey')
- ))
+ ->with($this->callback(function ($token) {
+ return 'TheKey' === $token->getKey();
+ }))
->will($this->returnValue($anonymousToken))
;