public function testLoginUser() { $user = $this->getMockBuilder('\\pmill\\Auth\\Interfaces\\AuthUser')->getMock(); $user->method('getAuthId')->willReturn(1); $auth = new \pmill\Auth\Authenticate(); $auth->loginUser($user); $this->assertEquals(1, $auth->getLoggedInUserId()); }