From: colemanw Date: Thu, 2 Nov 2023 16:10:52 +0000 (-0400) Subject: APIv4 - Ensure ContactType api handles accent characters X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=6467860dee0587e66c88d833317cb1937561a346;p=civicrm-core.git APIv4 - Ensure ContactType api handles accent characters --- diff --git a/tests/phpunit/api/v4/Entity/ContactTypeTest.php b/tests/phpunit/api/v4/Entity/ContactTypeTest.php index 6d766eeabb..89494b68e2 100644 --- a/tests/phpunit/api/v4/Entity/ContactTypeTest.php +++ b/tests/phpunit/api/v4/Entity/ContactTypeTest.php @@ -36,20 +36,21 @@ class ContactTypeTest extends Api4TestBase implements TransactionalInterface { public function testMenuItemWillBeCreatedAndDeleted(): void { ContactType::create(FALSE) ->addValue('name', 'Tester') - ->addValue('label', 'Tester') + ->addValue('label', 'Tèstër') ->addValue('parent_id.name', 'Individual') ->execute(); // Menu item should have been auto-created - $this->assertCount(1, Navigation::get(FALSE)->addWhere('name', '=', 'New Tester')->execute()); + $nav = Navigation::get(FALSE)->addWhere('name', '=', 'New Tester')->execute()->single(); + $this->assertEquals('New Tèstër', $nav['label']); ContactType::update(FALSE) ->addWhere('name', '=', 'Tester') - ->addValue('label', 'Tested') + ->addValue('label', 'Wëll Téstęd!') ->execute(); // Menu item should have been updated $nav = Navigation::get(FALSE)->addWhere('name', '=', 'New Tester')->execute()->single(); - $this->assertEquals('New Tested', $nav['label']); + $this->assertEquals('New Wëll Téstęd!', $nav['label']); ContactType::delete(FALSE) ->addWhere('name', '=', 'Tester')