/**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setup();
     $this->installEntitySchema('node');
     $this->installEntitySchema('taxonomy_term');
     $this->installEntitySchema('entity_test');
     $this->nodeType = NodeType::create(['type' => Unicode::strtolower($this->randomMachineName()), 'name' => $this->randomString()]);
     $this->nodeType->save();
     $this->vocabulary = Vocabulary::create(['vid' => Unicode::strtolower($this->randomMachineName()), 'name' => $this->randomString()]);
     $this->vocabulary->save();
     // Create a custom bundle.
     $this->customBundle = 'test_bundle_' . Unicode::strtolower($this->randomMachineName());
     entity_test_create_bundle($this->customBundle, NULL, 'entity_test');
 }
 public function setUp()
 {
     parent::setup();
     $this->installConfig(array('pathauto', 'taxonomy', 'system', 'node'));
     $this->installEntitySchema('user');
     $this->installEntitySchema('node');
     $this->installEntitySchema('taxonomy_term');
     ConfigurableLanguage::createFromLangcode('fr')->save();
     $this->installSchema('node', array('node_access'));
     $this->installSchema('system', array('url_alias', 'sequences', 'router'));
     $type = NodeType::create(['type' => 'page']);
     $type->save();
     node_add_body_field($type);
     $this->nodePattern = $this->createPattern('node', '/content/[node:title]');
     $this->userPattern = $this->createPattern('user', '/users/[user:name]');
     \Drupal::service('router.builder')->rebuild();
     $this->currentUser = User::create(array('name' => $this->randomMachineName()));
     $this->currentUser->save();
 }
Example #3
0
 protected function setUp()
 {
     parent::setup();
     $this->installEntitySchema('file');
     $this->typedDataManager = $this->container->get('typed_data_manager');
 }
 protected function setUp()
 {
     parent::setup();
     $this->typedDataManager = $this->container->get('typed_data_manager');
 }