public function indexAction() { try { $this->service->logout(); return $this->redirect()->toRoute('home'); } catch (\Exception $e) { return $this->flashMessenger()->addErrorMessage('An unexpected error has occurred, please contact your system administrator'); } }
public function testLogout() { $this->authenticationServiceMock->expects($this->once())->method('clearIdentity'); $this->testedObject->logout(); }