function HtmlTest::testEscape

Same name in other branches
  1. 8.9.x core/tests/Drupal/Tests/Component/Utility/HtmlTest.php \Drupal\Tests\Component\Utility\HtmlTest::testEscape()
  2. 10 core/tests/Drupal/Tests/Component/Utility/HtmlTest.php \Drupal\Tests\Component\Utility\HtmlTest::testEscape()
  3. 11.x core/tests/Drupal/Tests/Component/Utility/HtmlTest.php \Drupal\Tests\Component\Utility\HtmlTest::testEscape()

Tests Html::escape().

@dataProvider providerEscape @covers ::escape

File

core/tests/Drupal/Tests/Component/Utility/HtmlTest.php, line 281

Class

HtmlTest
Tests \Drupal\Component\Utility\Html.

Namespace

Drupal\Tests\Component\Utility

Code

public function testEscape($expected, $text) {
    $this->assertEquals($expected, Html::escape($text));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.