onInteractiveLogin() public method

Will dispatch an event allowing listeners to return a valid eZ user for current authenticated user. Will by default let the repository load the anonymous user.
public onInteractiveLogin ( Symfony\Component\Security\Http\Event\InteractiveLoginEvent $event )
$event Symfony\Component\Security\Http\Event\InteractiveLoginEvent
 public function testOnInteractiveLogin()
 {
     $user = $this->getMock('Symfony\\Component\\Security\\Core\\User\\UserInterface');
     $token = $this->getMock('Symfony\\Component\\Security\\Core\\Authentication\\Token\\TokenInterface');
     $token->expects($this->once())->method('getUser')->will($this->returnValue($user));
     $token->expects($this->once())->method('getRoles')->will($this->returnValue(array('ROLE_USER')));
     $token->expects($this->once())->method('getAttributes')->will($this->returnValue(array('foo' => 'bar')));
     $event = new BaseInteractiveLoginEvent(new Request(), $token);
     $anonymousUserId = 10;
     $this->configResolver->expects($this->once())->method('getParameter')->with('anonymous_user_id')->will($this->returnValue($anonymousUserId));
     $apiUser = $this->getMock('eZ\\Publish\\API\\Repository\\Values\\User\\User');
     $userService = $this->getMock('eZ\\Publish\\API\\Repository\\UserService');
     $userService->expects($this->once())->method('loadUser')->with($anonymousUserId)->will($this->returnValue($apiUser));
     $this->repository->expects($this->once())->method('getUserService')->will($this->returnValue($userService));
     $this->repository->expects($this->once())->method('setCurrentUser')->with($apiUser);
     $this->tokenStorage->expects($this->once())->method('setToken')->with($this->isInstanceOf('eZ\\Publish\\Core\\MVC\\Symfony\\Security\\InteractiveLoginToken'));
     $this->listener->onInteractiveLogin($event);
 }