You are here

protected function TaxonomyTermArgumentDepthTest::setUp in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermArgumentDepthTest.php \Drupal\Tests\taxonomy\Functional\Views\TaxonomyTermArgumentDepthTest::setUp()
  2. 10 core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermArgumentDepthTest.php \Drupal\Tests\taxonomy\Functional\Views\TaxonomyTermArgumentDepthTest::setUp()

Overrides TaxonomyTestBase::setUp

File

core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermArgumentDepthTest.php, line 45

Class

TaxonomyTermArgumentDepthTest
Tests the taxonomy term with depth argument.

Namespace

Drupal\Tests\taxonomy\Functional\Views

Code

protected function setUp($import_test_views = TRUE) {
  parent::setUp($import_test_views);

  // Create a term with markup in the label.
  $first = $this
    ->createTerm([
    'name' => '<em>First</em>',
  ]);

  // Create a node w/o any terms.
  $settings = [
    'type' => 'article',
  ];

  // Create a node with linked to the term.
  $settings['field_views_testing_tags'][0]['target_id'] = $first
    ->id();
  $this->nodes[] = $this
    ->drupalCreateNode($settings);
  $this->terms[0] = $first;
}