function XssTest::testInvalidMultiByte
Same name in other branches
- 8.9.x core/tests/Drupal/Tests/Component/Utility/XssTest.php \Drupal\Tests\Component\Utility\XssTest::testInvalidMultiByte()
- 10 core/tests/Drupal/Tests/Component/Utility/XssTest.php \Drupal\Tests\Component\Utility\XssTest::testInvalidMultiByte()
- 11.x core/tests/Drupal/Tests/Component/Utility/XssTest.php \Drupal\Tests\Component\Utility\XssTest::testInvalidMultiByte()
Checks that invalid multi-byte sequences are rejected.
@dataProvider providerTestInvalidMultiByte
Parameters
string $value: The value to filter.
string $expected: The expected result.
string $message: The assertion message to display upon failure.
File
-
core/
tests/ Drupal/ Tests/ Component/ Utility/ XssTest.php, line 461
Class
- XssTest
- XSS Filtering tests.
Namespace
Drupal\Tests\Component\UtilityCode
public function testInvalidMultiByte($value, $expected, $message) {
$this->assertEquals(Xss::filter($value), $expected, $message);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.