function TaxonomyDefaultArgumentTest::testTermTitleEscaping

Same name in other branches
  1. 8.9.x core/modules/taxonomy/tests/src/Functional/Views/TaxonomyDefaultArgumentTest.php \Drupal\Tests\taxonomy\Functional\Views\TaxonomyDefaultArgumentTest::testTermTitleEscaping()
  2. 10 core/modules/taxonomy/tests/src/Functional/Views/TaxonomyDefaultArgumentTest.php \Drupal\Tests\taxonomy\Functional\Views\TaxonomyDefaultArgumentTest::testTermTitleEscaping()
  3. 11.x core/modules/taxonomy/tests/src/Functional/Views/TaxonomyDefaultArgumentTest.php \Drupal\Tests\taxonomy\Functional\Views\TaxonomyDefaultArgumentTest::testTermTitleEscaping()

Tests escaping of page title when the taxonomy plugin provides it.

File

core/modules/taxonomy/tests/src/Functional/Views/TaxonomyDefaultArgumentTest.php, line 27

Class

TaxonomyDefaultArgumentTest
Tests the representative node relationship for terms.

Namespace

Drupal\Tests\taxonomy\Functional\Views

Code

public function testTermTitleEscaping() {
    $this->term1
        ->setName('<em>Markup</em>')
        ->save();
    $this->drupalGet('taxonomy_default_argument_test/' . $this->term1
        ->id());
    $this->assertSession()
        ->assertEscaped($this->term1
        ->label());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.