コード例 #1
0
 /**
  * Helper method that initializes some default data from an existing legacy
  * test fixture.
  *
  * @return void
  */
 private function initFromFixture()
 {
     list($this->userGroups) = $this->repository->loadFixture('UserGroup');
     list($this->users) = $this->repository->loadFixture('User');
     // Set the default relations.
     $this->user2groups[10] = array(42 => true);
     $this->user2groups[14] = array(12 => true);
 }
コード例 #2
0
 /**
  * Helper method that initializes some default data from an existing legacy
  * test fixture.
  *
  * @return void
  */
 private function initFromFixture()
 {
     $this->groups = array();
     list($this->groups, $this->nextGroupId) = $this->repository->loadFixture('ObjectStateGroup');
     ++$this->nextGroupId;
     list($this->states, $this->groupStateMap, $this->objectStateMap, $this->nextStateId) = $this->repository->loadFixture('ObjectState', array('groups' => $this->groups));
     ++$this->nextStateId;
 }
コード例 #3
0
 /**
  * Helper method that initializes some default data from an existing legacy
  * test fixture.
  *
  * @return void
  */
 private function initFromFixture()
 {
     $this->locations = array();
     $this->nextLocationId = 0;
     list($locations, $this->nextLocationId) = $this->repository->loadFixture('Location');
     foreach ($locations as $location) {
         $this->locations[$location->id] = $location;
         $this->nextLocationId = max($this->nextLocationId, $location->id);
     }
 }
コード例 #4
0
 /**
  * Helper method that initializes some default data from an existing legacy
  * test fixture.
  *
  * @return void
  */
 private function initFromFixture()
 {
     $this->aliases = array();
     $this->nextAliasId = 0;
     list($aliases, $this->nextAliasId) = $this->repository->loadFixture('URLAlias');
     foreach ($aliases as $alias) {
         $this->aliases[$alias->id] = $alias;
         $this->nextAliasId = max($this->nextAliasId, $alias->id);
     }
 }
コード例 #5
0
 /**
  * Helper method that initializes some default data from an existing legacy
  * test fixture.
  *
  * @return void
  */
 private function initFromFixture()
 {
     $this->groups = array();
     $this->groupsById = array();
     list($contentTypeGroups, $this->nextGroupId) = $this->repository->loadFixture('ContentTypeGroup');
     ++$this->nextGroupId;
     foreach ($contentTypeGroups as $group) {
         $this->setGroup($group);
     }
     list($this->types, $this->nextTypeId, $this->nextFieldDefinitionId) = $this->repository->loadFixture('ContentType', array('groups' => $contentTypeGroups));
     ++$this->nextTypeId;
     ++$this->nextFieldDefinitionId;
 }
コード例 #6
0
 /**
  * Helper method that initializes some default data from an existing legacy
  * test fixture.
  *
  * @return void
  */
 private function initFromFixture()
 {
     list($this->languages, $this->codes, $this->nextId) = $this->repository->loadFixture('Language');
 }
コード例 #7
0
 /**
  * Helper method that initializes some default data from an existing legacy
  * test fixture.
  *
  * @return void
  */
 private function initFromFixture()
 {
     list($this->roles, $this->nameToRoleId, $this->nextRoleId, $this->content2roles, $this->policies, $this->policyNextId, $this->role2policy, $this->roleLimitations) = $this->repository->loadFixture('Role');
 }
コード例 #8
0
 /**
  * Helper method that initializes some default data from an existing legacy
  * test fixture.
  *
  * @return void
  */
 private function initFromFixture()
 {
     list($this->sections, $this->identifiers, $this->assignedContents, $this->nextId) = $this->repository->loadFixture('Section');
 }
コード例 #9
0
 /**
  * Helper method that initializes some default data from an existing legacy
  * test fixture.
  *
  * @return void
  */
 private function initFromFixture()
 {
     list($this->contentInfo, $this->contentNextId, $this->versionInfo, $this->versionNextId, $this->content) = $this->repository->loadFixture('Content');
 }