3 namespace Drupal\Tests\taxonomy\Functional\Views;
6 * Tests the taxonomy term with depth argument.
10 class TaxonomyTermArgumentDepthTest extends TaxonomyTestBase {
15 public static $modules = ['taxonomy', 'taxonomy_test_views', 'views', 'node'];
20 public static $testViews = ['test_argument_taxonomy_index_tid_depth'];
23 * @var \Drupal\taxonomy\TermInterface[]
25 protected $terms = [];
28 * @var \Drupal\views\ViewExecutable
35 protected function setUp($import_test_views = TRUE) {
36 parent::setUp($import_test_views);
38 // Create a term with markup in the label.
39 $first = $this->createTerm(['name' => '<em>First</em>']);
41 // Create a node w/o any terms.
42 $settings = ['type' => 'article'];
44 // Create a node with linked to the term.
45 $settings['field_views_testing_tags'][0]['target_id'] = $first->id();
46 $this->nodes[] = $this->drupalCreateNode($settings);
48 $this->terms[0] = $first;
52 * Tests title escaping.
54 public function testTermWithDepthArgumentTitleEscaping() {
55 $this->drupalGet('test_argument_taxonomy_index_tid_depth/' . $this->terms[0]->id());
56 $this->assertEscaped($this->terms[0]->label());