diff options
author | WouterJ <waldio.webdesign@gmail.com> | 2015-06-29 13:59:59 +0200 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2015-07-02 01:04:13 +0200 |
commit | cba12eee6f9d829e7c2307982513d01b99830b83 (patch) | |
tree | aed03cf12bf56633ae29157a27a3305e5557f770 /Core/Tests/Authentication/Provider | |
parent | c839c1382bfd96b6a356a2e9498bf5bd1ff775c1 (diff) | |
download | symfony-security-cba12eee6f9d829e7c2307982513d01b99830b83.zip symfony-security-cba12eee6f9d829e7c2307982513d01b99830b83.tar.gz symfony-security-cba12eee6f9d829e7c2307982513d01b99830b83.tar.bz2 |
[DX] [Security] Renamed Token#getKey() to getSecret()
Diffstat (limited to 'Core/Tests/Authentication/Provider')
-rw-r--r-- | Core/Tests/Authentication/Provider/AnonymousAuthenticationProviderTest.php | 6 | ||||
-rw-r--r-- | Core/Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/Core/Tests/Authentication/Provider/AnonymousAuthenticationProviderTest.php b/Core/Tests/Authentication/Provider/AnonymousAuthenticationProviderTest.php index 5a189b0..5b71747 100644 --- a/Core/Tests/Authentication/Provider/AnonymousAuthenticationProviderTest.php +++ b/Core/Tests/Authentication/Provider/AnonymousAuthenticationProviderTest.php @@ -37,7 +37,7 @@ class AnonymousAuthenticationProviderTest extends \PHPUnit_Framework_TestCase { $provider = $this->getProvider('foo'); - $this->assertNull($provider->authenticate($this->getSupportedToken('bar'))); + $provider->authenticate($this->getSupportedToken('bar')); } public function testAuthenticate() @@ -50,9 +50,9 @@ class AnonymousAuthenticationProviderTest extends \PHPUnit_Framework_TestCase protected function getSupportedToken($key) { - $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\AnonymousToken', array('getKey'), array(), '', false); + $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\AnonymousToken', array('getSecret'), array(), '', false); $token->expects($this->any()) - ->method('getKey') + ->method('getSecret') ->will($this->returnValue($key)) ; diff --git a/Core/Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php b/Core/Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php index a6fff4b..735d195 100644 --- a/Core/Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php +++ b/Core/Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php @@ -36,10 +36,10 @@ class RememberMeAuthenticationProviderTest extends \PHPUnit_Framework_TestCase /** * @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException */ - public function testAuthenticateWhenKeysDoNotMatch() + public function testAuthenticateWhenSecretsDoNotMatch() { - $provider = $this->getProvider(null, 'key1'); - $token = $this->getSupportedToken(null, 'key2'); + $provider = $this->getProvider(null, 'secret1'); + $token = $this->getSupportedToken(null, 'secret2'); $provider->authenticate($token); } @@ -77,7 +77,7 @@ class RememberMeAuthenticationProviderTest extends \PHPUnit_Framework_TestCase $this->assertEquals('', $authToken->getCredentials()); } - protected function getSupportedToken($user = null, $key = 'test') + protected function getSupportedToken($user = null, $secret = 'test') { if (null === $user) { $user = $this->getMock('Symfony\Component\Security\Core\User\UserInterface'); @@ -87,7 +87,7 @@ class RememberMeAuthenticationProviderTest extends \PHPUnit_Framework_TestCase ->will($this->returnValue(array())); } - $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\RememberMeToken', array('getProviderKey'), array($user, 'foo', $key)); + $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\RememberMeToken', array('getProviderKey'), array($user, 'foo', $secret)); $token ->expects($this->once()) ->method('getProviderKey') |