parent::stub()->returns(self::getUserInstanceMock()), )); } public function isNull() { return false; } private static function getUserInstanceMock() { $mockUserInstance = new User(); $mockUserInstance->id = 'MOCK_ID'; $mockUserInstance->email = 'MOCK_EMAIL'; $mockUserInstance->password = 'MOCK_PASSWORD'; return $mockUserInstance; } }