function HtmlTest::testDeprecations
Same name in other branches
- 9 core/tests/Drupal/Tests/Component/Utility/HtmlTest.php \Drupal\Tests\Component\Utility\HtmlTest::testDeprecations()
Test deprecations.
@group legacy
File
-
core/
tests/ Drupal/ Tests/ Component/ Utility/ HtmlTest.php, line 426
Class
Namespace
Drupal\Tests\Component\UtilityCode
public function testDeprecations() : void {
$this->expectDeprecation('Passing NULL to Drupal\\Component\\Utility\\Html::decodeEntities is deprecated in drupal:9.5.0 and will trigger a PHP error from drupal:11.0.0. Pass a string instead. See https://www.drupal.org/node/3318826');
$this->assertSame('', Html::decodeEntities(NULL));
$this->expectDeprecation('Passing NULL to Drupal\\Component\\Utility\\Html::escape is deprecated in drupal:9.5.0 and will trigger a PHP error from drupal:11.0.0. Pass a string instead. See https://www.drupal.org/node/3318826');
$this->assertSame('', Html::escape(NULL));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.