/** * @param SecurityUserInterface $user * * @return SecurityUserInterface * @throws UnsupportedUserException */ public function refreshUser(SecurityUserInterface $user) { if ($this->stateless) { throw new UnsupportedUserException(); } return parent::refreshUser($user); }
/** * @expectedException \Symfony\Component\Security\Core\Exception\UnsupportedUserException */ public function testRefreshInvalidUser() { $user = $this->getMock('Symfony\\Component\\Security\\Core\\User\\UserInterface'); $this->userProvider->refreshUser($user); }