Beispiel #1
0
 /**
  * {@inheritdoc}
  */
 protected function setUpFixtures()
 {
     $this->installEntitySchema('user');
     $this->installEntitySchema('entity_test');
     $this->installConfig(['entity_test']);
     Block::create(['id' => 'test_block', 'plugin' => 'system_main_block'])->save();
     parent::setUpFixtures();
 }
 protected function setUpFixtures()
 {
     $this->installEntitySchema('user');
     $this->installEntitySchema('node');
     $this->installEntitySchema('comment');
     $this->installSchema('comment', array('comment_entity_statistics'));
     $this->installConfig(array('field'));
     entity_create('node_type', array('type' => 'page', 'name' => 'Page'))->save();
     $this->container->get('comment.manager')->addDefaultField('node', 'page');
     parent::setUpFixtures();
     $this->installConfig(array('filter'));
 }
 /**
  * {@inheritdoc}
  */
 protected function setUpFixtures()
 {
     parent::setUpFixtures();
     $this->installEntitySchema('user');
     $this->installEntitySchema('entity_test');
     // Create some test entities.
     for ($i = 0; $i < 5; $i++) {
         EntityTest::create(['name' => $this->randomString()])->save();
     }
     // Create and admin user.
     $this->adminUser = $this->createUser([], FALSE, TRUE);
 }
 /**
  * {@inheritdoc}
  */
 protected function setUpFixtures()
 {
     parent::setUpFixtures();
     $this->installEntitySchema('user');
     $this->installEntitySchema('node');
     $this->installSchema('node', 'node_access');
     $type = NodeType::create(['type' => 'test']);
     $type->save();
     $this->editorUser = $this->createUser(['bypass node access']);
     $this->powerUser = $this->createUser(['access content', 'create test content', 'edit own test content', 'delete own test content']);
     $this->regularUser = $this->createUser(['access content']);
     // Create some test entities.
     for ($i = 0; $i < 5; $i++) {
         Node::create(['title' => 'b' . $i . $this->randomMachineName(), 'type' => 'test'])->save();
     }
     // Create a power user node.
     Node::create(['title' => 'z' . $this->randomMachineName(), 'uid' => $this->powerUser->id(), 'type' => 'test'])->save();
 }