8000 [DX] [Security] Renamed Token#getKey() to getSecret() by wouterj · Pull Request #15141 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[DX] [Security] Renamed Token#getKey() to getSecret() #15141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Fa 8000 iled to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix some tests
  • Loading branch information
wouterj committed Jun 29, 2015
commit b0e22e279fb41158cd487076fb6eaadb919fecb5
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function testHandleWithTokenStorageHavingAToken()
->method('authenticate')
;

$listener = new AnonymousAuthenticationListener($tokenStorage, 'TheKey', null, $authenticationManager);
$listener = new AnonymousAuthenticationListener($tokenStorage, 'TheSecret', null, $authenticationManager);
$listener->handle($this->getMock('Symfony\Component\HttpKernel\Event\GetResponseEvent', array(), array(), '', false));
}

Expand All @@ -48,15 +48,15 @@ public function testHandleWithTokenStorageHavingNoToken()
->will($this->returnValue(null))
;

$anonymousToken = new AnonymousToken('TheKey', 'anon.', array());
$anonymousToken = new AnonymousToken('TheSecret', 'anon.', array());

$authenticationManager = $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface');
$authenticationManager
->expects($this->once())
->method('authenticate')
->with(self::logicalAnd(
$this->isInstanceOf('Symfony\Component\Security\Core\Authentication\Token\AnonymousToken'),
$this->attributeEqualTo('key', 'TheKey')
$this->attributeEqualTo('secret', 'TheSecret')
))
->will($this->returnValue($anonymousToken))
;
Expand All @@ -67,7 +67,7 @@ public function testHandleWithTokenStorageHavingNoToken()
->with($anonymousToken)
;

$listener = new AnonymousAuthenticationListener($tokenStorage, 'TheKey', null, $authenticationManager);
$listener = new AnonymousAuthenticationListener($tokenStorage, 'TheSecret', null, $authenticationManager);
$listener->handle($this->getMock('Symfony\Component\HttpKernel\Event\GetResponseEvent', array(), array(), '', false));
}

Expand All @@ -82,7 +82,7 @@ public function testHandledEventIsLogged()

$authenticationManager = $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface');

$listener = new AnonymousAuthenticationListener($tokenStorage, 'TheKey', $logger, $authenticationManager);
$listener = new AnonymousAuthenticationListener($tokenStorage, 'TheSecret', $logger, $authenticationManager);
$listener->handle($this->getMock('Symfony\Component\HttpKernel\Event\GetResponseEvent', array(), array(), '', false));
}
}
0