function TaxonomyIndexTidFilterTest::setUp
Same name in other branches
- 9 core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyIndexTidFilterTest.php \Drupal\Tests\taxonomy\Kernel\Views\TaxonomyIndexTidFilterTest::setUp()
- 8.9.x core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyIndexTidFilterTest.php \Drupal\Tests\taxonomy\Kernel\Views\TaxonomyIndexTidFilterTest::setUp()
- 10 core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyIndexTidFilterTest.php \Drupal\Tests\taxonomy\Kernel\Views\TaxonomyIndexTidFilterTest::setUp()
Overrides TaxonomyTestBase::setUp
File
-
core/
modules/ taxonomy/ tests/ src/ Kernel/ Views/ TaxonomyIndexTidFilterTest.php, line 34
Class
- TaxonomyIndexTidFilterTest
- Test the taxonomy term index filter.
Namespace
Drupal\Tests\taxonomy\Kernel\ViewsCode
protected function setUp($import_test_views = TRUE) : void {
parent::setUp(FALSE);
// Setup vocabulary and terms so the initial import is valid.
Vocabulary::create([
'vid' => 'tags',
'name' => 'Tags',
])->save();
// This will get a term ID of 3.
$term = Term::create([
'vid' => 'tags',
'name' => 'muh',
]);
$term->save();
// This will get a term ID of 4.
$this->terms[$term->id()] = $term;
$term = Term::create([
'vid' => 'tags',
'name' => 'muh',
]);
$term->save();
$this->terms[$term->id()] = $term;
ViewTestData::createTestViews(static::class, [
'taxonomy_test_views',
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.