[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 $authenticationManager
->expects($this->once()) ->expects($this->once())
->method('authenticate') ->method('authenticate')
->with(self::logicalAnd( ->with($this->callback(function ($token) {
$this->isInstanceOf('Symfony\Component\Security\Core\Authentication\Token\AnonymousToken'), return 'TheKey' === $token->getKey();
$this->attributeEqualTo('key', 'TheKey') }))
))
->will($this->returnValue($anonymousToken)) ->will($this->returnValue($anonymousToken))
; ;