You are here

public function XssTest::providerTestAttributes in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Component/Utility/XssTest.php \Drupal\Tests\Component\Utility\XssTest::providerTestAttributes()

Data provider for testFilterXssAdminNotNormalized().

File

core/tests/Drupal/Tests/Component/Utility/XssTest.php, line 505
Contains \Drupal\Tests\Component\Utility\XssTest.

Class

XssTest
XSS Filtering tests.

Namespace

Drupal\Tests\Component\Utility

Code

public function providerTestAttributes() {
  return array(
    array(
      '<img src="http://example.com/foo.jpg" title="Example: title" alt="Example: alt">',
      '<img src="http://example.com/foo.jpg" title="Example: title" alt="Example: alt">',
      'Image tag with alt and title attribute',
      array(
        'img',
      ),
    ),
    array(
      '<img src="http://example.com/foo.jpg" data-caption="Drupal 8: The best release ever.">',
      '<img src="http://example.com/foo.jpg" data-caption="Drupal 8: The best release ever.">',
      'Image tag with data attribute',
      array(
        'img',
      ),
    ),
  );
}