/**
  * @return void
  */
 public function testProcessLogout()
 {
     $sessionId = 50;
     $this->adminSessionInfoFactoryMock->expects($this->any())->method('create')->willReturn($this->currentSessionMock);
     $this->authSessionMock->expects($this->once())->method('getSessionId')->willReturn($sessionId);
     $this->currentSessionMock->expects($this->once())->method('load')->willReturnSelf();
     $this->currentSessionMock->expects($this->once())->method('setData')->with('status', \Magento\Security\Model\AdminSessionInfo::LOGGED_OUT)->willReturnSelf();
     $this->currentSessionMock->expects($this->once())->method('save')->willReturnSelf();
     $this->model->processLogout();
 }
Exemplo n.º 2
0
 /**
  * @param \Magento\Backend\Model\Auth $authModel
  * @return void
  * @SuppressWarnings(PHPMD.UnusedFormalParameter)
  */
 public function beforeLogout(\Magento\Backend\Model\Auth $authModel)
 {
     $this->sessionsManager->processLogout();
 }