You are here

public function NameFormatParserTest::patternDataProvider in Name Field 8

Convert names() to PHPUnit compatible format.

Return value

array An array of names.

File

tests/src/Unit/NameFormatParserTest.php, line 50

Class

NameFormatParserTest
Tests the name formatter.

Namespace

Drupal\Tests\name\Unit

Code

public function patternDataProvider() {
  $data = [];
  foreach ($this
    ->names() as $dataSet) {
    foreach ($dataSet['tests'] as $pattern => $expected) {
      $data[] = [
        $dataSet['components'],
        $pattern,
        $expected,
      ];
    }
  }
  return $data;
}