public function TwigSanitizeTest::providerTestArrayUniqueValues in Twig Tools 8
Provides test data for testArrayUnique.
Return value
array An array of test data and their unique values.
File
- tests/
src/ Unit/ TwigSanitizeTest.php, line 80
Class
- TwigSanitizeTest
- Tests to ensure sanitization filters work correctly.
Namespace
Drupal\Tests\twig_tools\UnitCode
public function providerTestArrayUniqueValues() {
return [
[
"{{- [\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 ]|array_unique|join(', ') -}}",
"0, 1, 2, 3, , Unique, Not Unique",
],
];
}