Esempio n. 1
0
 public function testLogout()
 {
     $this->auth->expects($this->once())->method('clearIdentity');
     $this->authenticator->logout();
 }
 public function testGetLoggedInUserReturnsNullIfNoUserLoggedIn()
 {
     $this->auth->expects($this->once())->method('hasIdentity')->will($this->returnValue(false));
     $user = $this->service->getLoggedInUser();
     $this->assertNull($user);
 }