You are here

public function TwigSanitizeTest::providerTestRemoveEmptyValues in Twig Tools 8

Provides test data for providerTestRemoveEmptyValues.

Return value

array An array of test data and their falsy values.

File

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

Class

TwigSanitizeTest
Tests to ensure sanitization filters work correctly.

Namespace

Drupal\Tests\twig_tools\Unit

Code

public function providerTestRemoveEmptyValues() {
  return [
    [
      "{{-\n         [\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        [],\n      ]|remove_empty|join(', ') -}}",
      "1, 2, 3, 1, 1, 2, 1, 2, 1, Unique",
    ],
  ];
}