You are here

public function ExcludeSpecifiedItemsProcessorTest::provideRegexTests in Facets 8

Provides multiple data sets for ::testRegexFilter.

File

tests/src/Unit/Plugin/processor/ExcludeSpecifiedItemsProcessorTest.php, line 285

Class

ExcludeSpecifiedItemsProcessorTest
Unit test for processor.

Namespace

Drupal\Tests\facets\Unit\Plugin\processor

Code

public function provideRegexTests() {
  return [
    [
      'test',
      [
        'llama',
        'duck',
        'badger',
        'snake',
        'snaake',
        'snaaake',
        'snaaaake',
        'snaaaaake',
        'snaaaaaake',
        'snbke',
      ],
    ],
    [
      'llama',
      [
        'badger',
        'duck',
        'snake',
        'snaake',
        'snaaake',
        'snaaaake',
        'snaaaaake',
        'snaaaaaake',
        'snbke',
      ],
    ],
    [
      'duck',
      [
        'llama',
        'badger',
        'snake',
        'snaake',
        'snaaake',
        'snaaaake',
        'snaaaaake',
        'snaaaaaake',
        'snbke',
      ],
    ],
    [
      'sn(.*)ke',
      [
        'llama',
        'duck',
        'badger',
      ],
    ],
    [
      'sn(a*)ke',
      [
        'llama',
        'duck',
        'badger',
        'snbke',
      ],
    ],
    [
      'sn(a+)ke',
      [
        'llama',
        'duck',
        'badger',
        'snbke',
      ],
    ],
    [
      'sn(a{3,5})ke',
      [
        'llama',
        'duck',
        'badger',
        'snake',
        'snaake',
        'snaaaaaake',
        'snbke',
      ],
    ],
  ];
}