protected function TaxonomyTermArgumentDepthTest::setUp in Drupal 10
Same name in this branch
- 10 core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermArgumentDepthTest.php \Drupal\Tests\taxonomy\Functional\Views\TaxonomyTermArgumentDepthTest::setUp()
- 10 core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyTermArgumentDepthTest.php \Drupal\Tests\taxonomy\Kernel\Views\TaxonomyTermArgumentDepthTest::setUp()
Same name and namespace in other branches
- 8 core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermArgumentDepthTest.php \Drupal\Tests\taxonomy\Functional\Views\TaxonomyTermArgumentDepthTest::setUp()
- 9 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\ViewsCode
protected function setUp($import_test_views = TRUE, $modules = []) : void {
parent::setUp($import_test_views, $modules);
// 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;
}