TaxonomyTermArgumentDepthTest.php in Zircon Profile 8.0
File
core/modules/taxonomy/src/Tests/Views/TaxonomyTermArgumentDepthTest.php
View source
<?php
namespace Drupal\taxonomy\Tests\Views;
class TaxonomyTermArgumentDepthTest extends TaxonomyTestBase {
public static $modules = [
'taxonomy',
'taxonomy_test_views',
'views',
'node',
];
public static $testViews = [
'test_argument_taxonomy_index_tid_depth',
];
protected $terms = [];
protected $view;
public function setUp() {
parent::setUp();
$first = $this
->createTerm([
'name' => '<em>First</em>',
]);
$settings = [
'type' => 'article',
];
$settings['field_views_testing_tags'][0]['target_id'] = $first
->id();
$this->nodes[] = $this
->drupalCreateNode($settings);
$this->terms[0] = $first;
}
public function testTermWithDepthArgumentTitleEscaping() {
$this
->drupalGet('test_argument_taxonomy_index_tid_depth/' . $this->terms[0]
->id());
$this
->assertEscaped($this->terms[0]
->label());
}
}