From 9162baf19d4dcb9bd56e31a7db3f7c9df470059c Mon Sep 17 00:00:00 2001 From: Bohan Yang Date: Tue, 12 Sep 2023 08:03:12 +0000 Subject: [PATCH] Update --- .../Tests/{Bcp47Test.php => LocaleMatcherTest.php} | 14 +++++++------- .../mango/Utils/{Bcp47.php => LocaleMatcher.php} | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) rename packages/mango/Tests/{Bcp47Test.php => LocaleMatcherTest.php} (87%) rename packages/mango/Utils/{Bcp47.php => LocaleMatcher.php} (99%) diff --git a/packages/mango/Tests/Bcp47Test.php b/packages/mango/Tests/LocaleMatcherTest.php similarity index 87% rename from packages/mango/Tests/Bcp47Test.php rename to packages/mango/Tests/LocaleMatcherTest.php index 9558a02..3e7a34b 100644 --- a/packages/mango/Tests/Bcp47Test.php +++ b/packages/mango/Tests/LocaleMatcherTest.php @@ -1,20 +1,20 @@ assertSame($expected, $bcp47->getBestMatch($clientLocale, $availableLocales)); + $this->assertSame($expected, $localeMatcher->getBestMatch($clientLocale, $availableLocales)); } } diff --git a/packages/mango/Utils/Bcp47.php b/packages/mango/Utils/LocaleMatcher.php similarity index 99% rename from packages/mango/Utils/Bcp47.php rename to packages/mango/Utils/LocaleMatcher.php index edacec2..6edb276 100644 --- a/packages/mango/Utils/Bcp47.php +++ b/packages/mango/Utils/LocaleMatcher.php @@ -12,7 +12,7 @@ use function preg_match; use function strtoupper; -class Bcp47 +class LocaleMatcher { private array $firstMatchesCache = [];