function BrowserTestBaseTest::testLegacyEscapingAssertions
Tests deprecation of legacy assertEscaped() and assertNoEscaped().
@group legacy
File
-
core/
tests/ Drupal/ FunctionalTests/ BrowserTestBaseTest.php, line 886
Class
- BrowserTestBaseTest
- Tests BrowserTestBase functionality.
Namespace
Drupal\FunctionalTestsCode
public function testLegacyEscapingAssertions() : void {
$this->expectDeprecation('AssertLegacyTrait::assertNoEscaped() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->assertNoEscaped() instead. See https://www.drupal.org/node/3129738');
$this->expectDeprecation('AssertLegacyTrait::assertEscaped() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->assertEscaped() instead. See https://www.drupal.org/node/3129738');
$this->drupalGet('test-escaped-characters');
$this->assertNoEscaped('<div class="escaped">');
$this->assertEscaped('Escaped: <"\'&>');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.