Example #1
0
 public function testSynchronizePersistentInfoWhenPersistentDataIsEnabled()
 {
     $this->helperMock->expects($this->once())->method('isEnabled')->will($this->returnValue(true));
     $this->sessionHelperMock->expects($this->once())->method('isPersistent')->will($this->returnValue(true));
     $this->sessionHelperMock->expects($this->once())->method('getSession')->will($this->returnValue($this->sessionMock));
     $this->observerMock->expects($this->once())->method('getEvent')->will($this->returnValue($this->eventManagerMock));
     $this->eventManagerMock->expects($this->once())->method('getRequest')->will($this->returnValue($this->requestMock));
     $this->customerSessionMock->expects($this->once())->method('isLoggedIn')->will($this->returnValue(false));
     $this->requestMock->expects($this->once())->method('getActionName')->will($this->returnValue('logout'));
     $this->requestMock->expects($this->once())->method('getControllerName')->will($this->returnValue('account'));
     $this->sessionMock->expects($this->once())->method('save');
     $this->model->synchronizePersistentInfo($this->observerMock);
 }