function UnicodeTest::providerUcwords

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php \Drupal\Tests\Component\Utility\UnicodeTest::providerUcwords()
  2. 8.9.x core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php \Drupal\Tests\Component\Utility\UnicodeTest::providerUcwords()
  3. 11.x 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 101

Class

UnicodeTest
Test unicode handling features implemented in Unicode component.

Namespace

Drupal\Tests\Component\Utility

Code

public static 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
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.