public function BlockXssTest::testNoUnexpectedEscaping in Drupal 9
Same name and namespace in other branches
- 8 core/modules/block/tests/src/Functional/BlockXssTest.php \Drupal\Tests\block\Functional\BlockXssTest::testNoUnexpectedEscaping()
Tests that nothing is escaped other than the blocks explicitly tested.
File
- core/
modules/ block/ tests/ src/ Functional/ BlockXssTest.php, line 34
Class
- BlockXssTest
- Tests that the block module properly escapes block descriptions.
Namespace
Drupal\Tests\block\FunctionalCode
public function testNoUnexpectedEscaping() {
$this
->drupalLogin($this
->drupalCreateUser([
'administer blocks',
'access administration pages',
]));
$this
->drupalGet(Url::fromRoute('block.admin_display'));
$this
->clickLink('Place block');
$this
->assertSession()
->assertNoEscaped('<');
}