You are here

public function UnicodeTest::providerUcwords in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php \Drupal\Tests\Component\Utility\UnicodeTest::providerUcwords()
  2. 9 core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php \Drupal\Tests\Component\Utility\UnicodeTest::providerUcwords()

Data provider for testUcwords().

Return value

array An array containing a string and its capitalized version.

See also

testUcwords()

File

core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php, line 99

Class

UnicodeTest
Test unicode handling features implemented in Unicode component.

Namespace

Drupal\Tests\Component\Utility

Code

public function providerUcwords() {

  // cSpell:disable
  return [
    [
      'tHe QUIcK bRoWn',
      'THe QUIcK BRoWn',
    ],
    [
      'françAIS',
      'FrançAIS',
    ],
    [
      'über',
      'Über',
    ],
    [
      'åwesome',
      'Åwesome',
    ],
    // Make sure we don't mangle extra spaces.
    [
      'frànçAIS is  über-åwesome',
      'FrànçAIS Is  Über-Åwesome',
    ],
    // Add a multibyte string.
    [
      'σion',
      'Σion',
    ],
  ];

  // cSpell:enable
}