[Security/Http] Fix test relying on a private property

This commit is contained in:
Nicolas Grekas 2015-07-22 18:52:24 +02:00
parent 07b3fa9c1c
commit 2d29ac1e10

View File

@ -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))
;