/**
  * @covers Alchemy\Phrasea\Authentication\Authenticator::setUser
  */
 public function testSetUser()
 {
     $app = $this->loadApp();
     $app['browser'] = $browser = $this->getBrowserMock();
     $app['session'] = $session = $this->getSessionMock();
     $app['EM'] = $em = $this->getEntityManagerMock();
     $user = $this->createUserMock();
     $authenticator = new Authenticator($app, $browser, $session, $em);
     $authenticator->setUser($user);
     $this->assertEquals($user, $authenticator->getUser());
     $authenticator->setUser(null);
     $this->assertNull($authenticator->getUser());
 }