function UnicodeTest::testUcwords

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php \Drupal\Tests\Component\Utility\UnicodeTest::testUcwords()
  2. 10 core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php \Drupal\Tests\Component\Utility\UnicodeTest::testUcwords()
  3. 11.x core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php \Drupal\Tests\Component\Utility\UnicodeTest::testUcwords()

Tests multibyte ucwords.

@dataProvider providerUcwords @covers ::ucwords

File

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

Class

UnicodeTest
Test unicode handling features implemented in Unicode component.

Namespace

Drupal\Tests\Component\Utility

Code

public function testUcwords($text, $expected) {
    $this->assertEquals($expected, Unicode::ucwords($text));
}

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