Exemplo n.º 1
0
 function testLogin()
 {
     $this->session->expects($this->any())->method('getStatus')->willReturn(PHP_SESSION_NONE);
     $dummyLogin = "******";
     $this->authModel = $this->createMock(IAuthModel::class);
     $this->authModel->expects($this->any())->method('getLogin')->willReturn($dummyLogin);
     $this->session->expects($this->exactly(2))->method('register')->withConsecutive(array(SessionManager::USER_LOGIN, $dummyLogin), array(SessionManager::USER, $this->authModel));
     $this->sessionManager->login($this->authModel);
 }
Exemplo n.º 2
0
 /**
  * @param IAuthModel $authModel
  */
 function login(IAuthModel $authModel)
 {
     $this->initialize();
     $this->session->register(self::USER_LOGIN, $authModel->getLogin());
     $this->session->register(self::USER, $authModel);
 }