function AssertLegacyTrait::assertEscaped
Same name in other branches
- 9 core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php \Drupal\FunctionalTests\AssertLegacyTrait::assertEscaped()
Passes if the raw text IS found escaped on the loaded page, fail otherwise.
Raw text refers to the raw HTML that the page generated.
Parameters
string $raw: Raw (HTML) string to look for.
Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->assertEscaped() instead.
45 calls to AssertLegacyTrait::assertEscaped()
- AddFeedTest::testFeedLabelEscaping in core/
modules/ aggregator/ tests/ src/ Functional/ AddFeedTest.php - Ensures that the feed label is escaping when rendering the feed icon.
- BlockTest::testThemeName in core/
modules/ block/ tests/ src/ Functional/ BlockTest.php - Test block display of theme titles.
- BlockUiTest::testBlockDemoUiPage in core/
modules/ block/ tests/ src/ Functional/ BlockUiTest.php - Test block demo page exists and functions correctly.
- BlockXssTest::doBlockContentTest in core/
modules/ block/ tests/ src/ Functional/ BlockXssTest.php - Tests XSS coming from Block Content block info.
- BlockXssTest::doMenuTest in core/
modules/ block/ tests/ src/ Functional/ BlockXssTest.php - Tests XSS coming from Menu block labels.
File
-
core/
tests/ Drupal/ FunctionalTests/ AssertLegacyTrait.php, line 659
Class
- AssertLegacyTrait
- Provides convenience methods for assertions in browser tests.
Namespace
Drupal\FunctionalTestsCode
protected function assertEscaped($raw) {
$this->assertSession()
->assertEscaped($raw);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.