function TaxonomyVocabularyArgumentTest::setUp
Same name in other branches
- 9 core/modules/taxonomy/tests/src/Functional/Views/TaxonomyVocabularyArgumentTest.php \Drupal\Tests\taxonomy\Functional\Views\TaxonomyVocabularyArgumentTest::setUp()
- 10 core/modules/taxonomy/tests/src/Functional/Views/TaxonomyVocabularyArgumentTest.php \Drupal\Tests\taxonomy\Functional\Views\TaxonomyVocabularyArgumentTest::setUp()
- 11.x core/modules/taxonomy/tests/src/Functional/Views/TaxonomyVocabularyArgumentTest.php \Drupal\Tests\taxonomy\Functional\Views\TaxonomyVocabularyArgumentTest::setUp()
Overrides TaxonomyTestBase::setUp
File
-
core/
modules/ taxonomy/ tests/ src/ Functional/ Views/ TaxonomyVocabularyArgumentTest.php, line 44
Class
- TaxonomyVocabularyArgumentTest
- Tests the vocabulary argument.
Namespace
Drupal\Tests\taxonomy\Functional\ViewsCode
protected function setUp($import_test_views = TRUE) {
parent::setUp($import_test_views);
// Add default vocabulary to list of vocabularies.
$this->vocabularies[] = $this->vocabulary;
// Create additional vocabulary.
$vocabulary = Vocabulary::create([
'name' => 'Views testing category',
'vid' => 'views_testing_category',
]);
$vocabulary->save();
$this->vocabularies[] = $vocabulary;
// Create some terms.
$this->terms[0] = $this->createTerm([
'name' => 'First',
'vid' => $this->vocabularies[0]
->id(),
]);
$this->terms[1] = $this->createTerm([
'name' => 'Second',
'vid' => $this->vocabularies[1]
->id(),
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.