/** * Setup the HandlerTest. */ protected function setUp() { parent::setUp(); $type = $this->persistenceHandler->contentTypeHandler()->create($this->getTypeCreateStruct()); $this->contentTypeToDelete[] = $type; $struct = $this->createContentStruct("test", "Welcome", $type); $this->content = $this->persistenceHandler->contentHandler()->create($struct); $this->contentToDelete[] = $this->content; $this->contentId = $this->content->versionInfo->contentInfo->id; $this->lastRelationId = $this->persistenceHandler->contentHandler()->addRelation(new RelationCreateStruct(array('sourceContentId' => 1, 'destinationContentId' => $this->contentId, 'type' => Relation::COMMON | Relation::EMBED)))->id; $this->content2 = $this->persistenceHandler->contentHandler()->create($this->createContentStruct("Second object", "Do you relate to me?", $type)); $this->contentToDelete[] = $this->content2; }
/** * Setup the HandlerTest. */ protected function setUp() { parent::setUp(); $type = $this->persistenceHandler->contentTypeHandler()->create($this->getTypeCreateStruct()); $this->contentTypeToDelete[] = $type; $this->lastLocationId = 2; for ($i = 0; $i < $this->entriesGenerated; ++$i) { $this->contents[] = $content = $this->persistenceHandler->contentHandler()->create(new ContentCreateStruct(array("name" => array("eng-GB" => "test_{$i}"), "ownerId" => 14, "sectionId" => 1, "typeId" => $type->id, "initialLanguageId" => 2, "fields" => array(new Field(array("fieldDefinitionId" => $type->fieldDefinitions[0]->id, "type" => "ezstring", "value" => new FieldValue(array('data' => "Welcome {$i}")), "languageCode" => "eng-GB")))))); $this->lastContentId = $content->versionInfo->contentInfo->id; $this->locations[] = $location = $this->persistenceHandler->locationHandler()->create(new CreateStruct(array("contentId" => $this->lastContentId, "contentVersion" => 1, "mainLocationId" => $this->lastLocationId, "sortField" => Location::SORT_FIELD_NAME, "sortOrder" => Location::SORT_ORDER_ASC, "parentId" => $this->lastLocationId))); $this->lastLocationId = $location->id; } $this->locationToDelete = $this->locations; $this->contentToDelete = $this->contents; }
/** * Setup the HandlerTest. */ protected function setUp() { parent::setUp(); $type = $this->persistenceHandler->contentTypeHandler()->create($this->getTypeCreateStruct()); $this->contentTypeToDelete[] = $type; $struct = new CreateStruct(); $struct->name = array('eng-GB' => "test"); $struct->ownerId = 14; $struct->sectionId = 1; $struct->typeId = $type->id; $struct->initialLanguageId = 2; $struct->fields[] = new Field(array("fieldDefinitionId" => $type->fieldDefinitions[0]->id, "type" => "ezstring", "value" => new FieldValue(array("data" => "Welcome")), "languageCode" => "eng-GB")); $this->content = $this->persistenceHandler->contentHandler()->create($struct); $this->contentToDelete[] = $this->content; $this->contentId = $this->content->versionInfo->contentInfo->id; }
/** * Setup the SectionHandlerTest. */ protected function setUp() { parent::setUp(); $this->handler = $this->persistenceHandler->contentLanguageHandler(); }
/** * Setup the SectionHandlerTest. */ protected function setUp() { parent::setUp(); $this->section = $this->persistenceHandler->sectionHandler()->create("Test", "test"); }
/** * Setup the SectionHandlerTest. */ protected function setUp() { parent::setUp(); $this->handler = $this->persistenceHandler->objectStateHandler(); }