eZ\Publish\Core\Repository\Tests\Service\Mock\Base::getRepository PHP Method

getRepository() protected method

Get Real repository with mocked dependencies.
protected getRepository ( array $serviceSettings = [] ) : eZ\Publish\API\Repository\Repository
$serviceSettings array If set then non shared instance of Repository is returned
return eZ\Publish\API\Repository\Repository
    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;
    }