Example #1
0
 public function testIsLoggedIn()
 {
     $user = $this->getMockBuilder('\\pmill\\Auth\\Interfaces\\AuthUser')->getMock();
     $user->method('getAuthId')->willReturn(1);
     $user->method('getAuthPassword')->willReturn($this->correctHashedPassword);
     $auth = new \pmill\Auth\Authenticate();
     $this->assertFalse($auth->isLoggedIn());
     $auth->login($user, $this->rawPassword);
     $this->assertTrue($auth->isLoggedIn());
 }