protected function getRepository(array $serviceSettings = array()) { if ($this->repository === null || !empty($serviceSettings)) { $repository = new Repository($this->getPersistenceMock(), $this->getSPIMockHandler('Search\\Handler'), $serviceSettings, $this->getStubbedUser(14)); if (!empty($serviceSettings)) { return $repository; } $this->repository = $repository; } return $this->repository; }