private TokenStorage
$tokenStorage;
private LogoutUrlGenerator
$generator;
protected function setUp(): void
{ $requestStack =
$this->
createMock(RequestStack::
class);
$request =
$this->
createMock(Request::
class);
$requestStack->
method('getCurrentRequest'
)->
willReturn($request);
$this->tokenStorage =
new TokenStorage();
$this->generator =
new LogoutUrlGenerator($requestStack, null,
$this->tokenStorage
);
} public function testGetLogoutPath() { $this->generator->
registerListener('secured_area', '/logout', null, null
);
$this->
assertSame('/logout',
$this->generator->
getLogoutPath('secured_area'
));
} public function testGetLogoutPathWithoutLogoutListenerRegisteredForKeyThrowsException() {