public function testGetLogoutPathWithoutLogoutListenerRegisteredForKeyThrowsException() { $this->
expectException(\InvalidArgumentException::
class);
$this->
expectExceptionMessage('No LogoutListener found for firewall key "unregistered_key".'
);
$this->generator->
registerListener('secured_area', '/logout', null, null, null
);
$this->generator->
getLogoutPath('unregistered_key'
);
} public function testGuessFromToken() { $this->tokenStorage->
setToken(new UsernamePasswordToken(new InMemoryUser('user', 'password'
), 'secured_area'
));
$this->generator->
registerListener('secured_area', '/logout', null, null
);
$this->
assertSame('/logout',
$this->generator->
getLogoutPath());
} public function testGuessFromCurrentFirewallKey() { $this->generator->
registerListener('secured_area', '/logout', null, null
);
$this->generator->
setCurrentFirewall('secured_area'
);
$this->
assertSame('/logout',
$this->generator->
getLogoutPath());
}