eZ\Publish\Core\Repository\Tests\Service\Integration\LocationBase::createTestContentLocation PHP Method

createTestContentLocation() protected method

protected createTestContentLocation ( integer $parentLocationId ) : eZ\Publish\API\Repository\Values\Content\Content
$parentLocationId integer
return eZ\Publish\API\Repository\Values\Content\Content
    protected function createTestContentLocation($parentLocationId)
    {
        $contentService = $this->repository->getContentService();
        $contentTypeService = $this->repository->getContentTypeService();
        // User Group content type
        $contentType = $contentTypeService->loadContentType(3);
        $contentCreate = $contentService->newContentCreateStruct($contentType, 'eng-GB');
        $contentCreate->setField('name', 'dummy value');
        $contentCreate->sectionId = 1;
        $contentCreate->ownerId = 14;
        $contentCreate->remoteId = md5(uniqid(get_class($this), true));
        $contentCreate->alwaysAvailable = true;
        $locationCreates = array(new LocationCreateStruct(array('remoteId' => md5(uniqid(get_class($this), true)), 'parentLocationId' => $parentLocationId)));
        return $contentService->publishVersion($contentService->createContent($contentCreate, $locationCreates)->versionInfo);
    }