public function XssTest::testAttribute in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Component/Utility/XssTest.php \Drupal\Tests\Component\Utility\XssTest::testAttribute()
Check that strings in HTML attributes are correctly processed.
@covers ::attributes @dataProvider providerTestAttributes
File
- core/
tests/ Drupal/ Tests/ Component/ Utility/ XssTest.php, line 497 - Contains \Drupal\Tests\Component\Utility\XssTest.
Class
- XssTest
- XSS Filtering tests.
Namespace
Drupal\Tests\Component\UtilityCode
public function testAttribute($value, $expected, $message, $allowed_tags = NULL) {
$value = Xss::filter($value, $allowed_tags);
$this
->assertEquals($expected, $value, $message);
}