public function NameFormatParserTest::testParseUsingRawFormat in Name Field 8
Tests parsing a name with special characters.
File
- tests/
src/ Unit/ NameFormatParserTest.php, line 85
Class
- NameFormatParserTest
- Tests the name formatter.
Namespace
Drupal\Tests\name\UnitCode
public function testParseUsingRawFormat() {
$components = [
'given' => 'Bobo',
'middle' => "'t",
'family' => "K'nijn",
];
$pattern = '((((t+ig)+im)+if)+is)+jc';
$settings = [
'markup' => 'raw',
];
$formatted = $this->parser
->parse($components, $pattern, $settings);
$this
->assertEquals("Bobo 't K'nijn", (string) $formatted);
}