function AssetXssTest::providerAssetUrl
Same name and namespace in other branches
- main core/tests/Drupal/FunctionalTests/Asset/AssetXssTest.php \Drupal\FunctionalTests\Asset\AssetXssTest::providerAssetUrl()
A dataProvider for JS and CSS asset tests.
Return value
array
- Array of inputs for the test URL
File
-
core/
tests/ Drupal/ FunctionalTests/ Asset/ AssetXssTest.php, line 39
Class
- AssetXssTest
- Tests sanitization of error messages emitted by AssetControllerBase.
Namespace
Drupal\FunctionalTests\AssetCode
public static function providerAssetUrl() {
$query = [
'language' => 'en',
'delta' => 1,
'theme' => 'drupal',
'include' => '<img src=x onerror=alert("xss")>',
];
return [
[
'path' => '/js/js_foo.js',
'query' => $query,
],
[
'path' => '/css/css_foo.css',
'query' => $query,
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.