Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By mpdonadio on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.0.x
Issue links:
Description:
Two methods have been added to AssertContentTrait to test whether escaped text is present on a page (or not).
The following assertions
Drupal 7
$this->assertRaw(check_plan($string1));
$this->assertNoRaw(check_plain($string2));
Drupal 8 - before
$this->assertRaw(Html::escape($string1));
$this->assertNoRaw(Html::escape($string2));
Can be replaced with
$this->assertEscaped($string1);
$this->assertNoEscaped($string2);
Impacts:
Module developers
Themers