You are here

public function XssTest::providerTestFilterXssAdminNotNormalized in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Component/Utility/XssTest.php \Drupal\Tests\Component\Utility\XssTest::providerTestFilterXssAdminNotNormalized()
  2. 10 core/tests/Drupal/Tests/Component/Utility/XssTest.php \Drupal\Tests\Component\Utility\XssTest::providerTestFilterXssAdminNotNormalized()

Data provider for testFilterXssAdminNotNormalized().

Return value

array An array of arrays containing strings:

  • The value to filter.
  • The value to expect after filtering.
  • The assertion message.

See also

testFilterXssAdminNotNormalized()

File

core/tests/Drupal/Tests/Component/Utility/XssTest.php, line 570

Class

XssTest
XSS Filtering tests.

Namespace

Drupal\Tests\Component\Utility

Code

public function providerTestFilterXssAdminNotNormalized() {
  return [
    // DRUPAL-SA-2008-044
    [
      '<object />',
      'object',
      'Admin HTML filter -- should not allow object tag.',
    ],
    [
      '<script />',
      'script',
      'Admin HTML filter -- should not allow script tag.',
    ],
  ];
}