You are here

public function TwigSanitizeTest::providerTestScrubClassArrayValues in Twig Tools 8

Provides test data for testScrubClassArray.

Return value

array An array of test data and their sanitized values.

File

tests/src/Unit/TwigSanitizeTest.php, line 166

Class

TwigSanitizeTest
Tests to ensure sanitization filters work correctly.

Namespace

Drupal\Tests\twig_tools\Unit

Code

public function providerTestScrubClassArrayValues() {
  return [
    [
      "{{-\n         [\n        'abcdefghijklmnopqrstuvwxyz_ABCDEFGHIJKLMNOPQRSTUVWXYZ-0123456789',\n        '¡¢£¤¥',\n        'css__identifier__with__double__underscores',\n        'invalid !\"#\$%&\\'()*+,./:;<=>?@[\\]^`{|}~ identifier',\n        'block__element--modifier',\n        'abcdefghijklmnopqrstuvwxyz_ABCDEFGHIJKLMNOPQRSTUVWXYZ-0123456789',\n        '¡¢£¤¥',\n        'css__identifier__with__double__underscores',\n        'invalid !\"#\$%&\\'()*+,./:;<=>?@[\\]^`{|}~ identifier',\n        'block__element--modifier',\n        '0',\n        '1',\n        '2',\n        '3',\n        '0',\n        '1',\n        NULL,\n        FALSE,\n        TRUE,\n        'Unique',\n        'Not Unique',\n        'Not Unique',\n        0,\n        1,\n        2,\n        0.0,\n        1.0,\n        2.0,\n        '0',\n        '1',\n        '2',\n        '3',\n        '0',\n        '1',\n        0,\n        1,\n        2,\n        0.0,\n        1.0,\n        2.0,\n        FALSE,\n        TRUE,\n        NULL,\n        'Unique',\n      ]|scrub_class_array|join(' ') -}}",
      "abcdefghijklmnopqrstuvwxyz-abcdefghijklmnopqrstuvwxyz-0123456789 ¡¢£¤¥ css__identifier__with__double__underscores invalid---identifier block__element--modifier _ unique not-unique",
    ],
  ];
}