You are here

public function TocFormatterTest::providerConvertStringToId in TOC API 8

Data provider for testConvertStringToId().

See also

testConvertStringToId()

File

tests/src/Unit/TocFormatterTest.php, line 60
Contains \Drupal\Tests\toc_api\Unit\TocFormatterTest.

Class

TocFormatterTest
Tests TOC API formatter.

Namespace

Drupal\Tests\toc_api\Unit

Code

public function providerConvertStringToId() {
  $tests[] = [
    'One',
    'one',
  ];
  $tests[] = [
    'One   two',
    'one-two',
  ];
  $tests[] = [
    'One ! two',
    'one-two',
  ];
  $tests[] = [
    '--One ! two--',
    'one-two',
  ];
  $tests[] = [
    'Spécial characters',
    'special-characters',
  ];
  return $tests;
}