mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
adjustment so that altnames are fully capitalized
This commit is contained in:
parent
aa852ec924
commit
8fca704f74
@ -27,8 +27,7 @@ class PersonEventListener
|
||||
} elseif ($event->getObject() instanceof PersonAltName){
|
||||
|
||||
$altname = $event->getObject();
|
||||
$altnameCaps = mb_convert_case(mb_strtolower($altname->getLabel()), MB_CASE_TITLE, 'UTF-8');
|
||||
$altnameCaps = ucwords(strtolower($altnameCaps), " \t\r\n\f\v'-");
|
||||
$altnameCaps = mb_strtoupper($altname->getLabel(), 'UTF-8');
|
||||
$altname->setLabel($altnameCaps);
|
||||
|
||||
} else {
|
||||
|
@ -61,10 +61,9 @@ class PersonCreateEventTest extends TestCase
|
||||
|
||||
public function generateAltNames(): iterator
|
||||
{
|
||||
yield ['vinCENT', 'Vincent'];
|
||||
yield ['jean-marie', 'Jean-Marie'];
|
||||
yield ['fastré', 'Fastré'];
|
||||
yield ['émile', 'Émile'];
|
||||
yield ['vinCENT', 'VINCENT'];
|
||||
yield ['jean-marie', 'JEAN-MARIE'];
|
||||
yield ['fastré', 'FASTRÉ'];
|
||||
yield ['émile', 'ÉMILE'];
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user