public function testLogout() { $user = $this->getMockBuilder('\\pmill\\Auth\\Interfaces\\AuthUser')->getMock(); $user->method('getAuthId')->willReturn(1); $user->method('getAuthPassword')->willReturn($this->correctHashedPassword); $auth = new \pmill\Auth\Authenticate(); $auth->login($user, $this->rawPassword); $this->assertEquals(1, $auth->getLoggedInUserId()); $auth->logout(); $this->assertEquals(null, $auth->getLoggedInUserId()); }