You are here

protected function ArgumentValidatorTermTest::setUp in Drupal 10

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

Parameters

bool $import_test_views: Should the views specified on the test class be imported. If you need to setup some additional stuff, like fields, you need to call false and then call createTestViews for your own.

Overrides TaxonomyTestBase::setUp

File

core/modules/taxonomy/tests/src/Kernel/Views/ArgumentValidatorTermTest.php, line 43

Class

ArgumentValidatorTermTest
Tests the plugin of the taxonomy: term argument validator.

Namespace

Drupal\Tests\taxonomy\Kernel\Views

Code

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

  // Add three terms to the 'tags' vocabulary.
  for ($i = 0; $i < 3; $i++) {
    $this->terms[] = $term = $this
      ->createTerm();
    $this->names[] = $term
      ->label();
    $this->ids[] = $term
      ->id();
  }
}