public function NameUnicodeExtrasTest::testNameUnicodeExtras in Name Field 8
Test NameUnicodeExtras functions.
@dataProvider patternDataProvider
File
- tests/
src/ Unit/ NameUnicodeExtrasTest.php, line 52
Class
- NameUnicodeExtrasTest
- Tests the unicode additional functions.
Namespace
Drupal\Tests\name\UnitCode
public function testNameUnicodeExtras($language, $text, $count, $expected_initials) {
$parts = NameUnicodeExtras::explode($text);
$initials = NameUnicodeExtras::initials($text);
$this
->assertEquals(count($parts), $count, 'Count parts for ' . $language . ' explode match.');
$this
->assertEquals($initials, $expected_initials, 'Initials for ' . $language . ' explode match. ' . $initials . ' ');
}