From 1478726b78520708388ab98efe6afe7df9d56aba Mon Sep 17 00:00:00 2001 From: Ange <45317331+Ange0@users.noreply.github.com> Date: Fri, 8 Jul 2022 12:26:24 +0000 Subject: [PATCH] GBP support for French Locale (#137) * Update Fr.php Add GBP on french locale * feat: add support for Livre sterling (GBP) to French locale * Update GBP replace livres sterling(s) by pound(s) * Aj Ajustement test GBP --- src/Legacy/Numbers/Words/Locale/Fr.php | 1 + tests/CurrencyTransformer/FrenchCurrencyTransformerTest.php | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/Legacy/Numbers/Words/Locale/Fr.php b/src/Legacy/Numbers/Words/Locale/Fr.php index 8b93864e..bc992980 100644 --- a/src/Legacy/Numbers/Words/Locale/Fr.php +++ b/src/Legacy/Numbers/Words/Locale/Fr.php @@ -97,6 +97,7 @@ class Fr extends Words 'CNY' => [['yuan'], ['fen']], 'DZD' => [['dinar'], ['centime']], 'EUR' => [['euro'], ['centime']], + 'GBP' => [['pound', 'pounds'], ['penny', 'pence']], 'JPY' => [['yen', ['sen']]], 'LYD' => [['dinar'], ['centime']], 'MAD' => [['dirham'], ['centime']], diff --git a/tests/CurrencyTransformer/FrenchCurrencyTransformerTest.php b/tests/CurrencyTransformer/FrenchCurrencyTransformerTest.php index 0568747d..615633a8 100644 --- a/tests/CurrencyTransformer/FrenchCurrencyTransformerTest.php +++ b/tests/CurrencyTransformer/FrenchCurrencyTransformerTest.php @@ -20,6 +20,10 @@ public function providerItConvertsMoneyAmountToWords(): array [754414599, 'AUD', 'sept millions cinq cent quarante-quatre mille cent quarante-cinq dollars australiens et quatre-vingt-dix-neuf cents'], [754414599, 'CAD', 'sept millions cinq cent quarante-quatre mille cent quarante-cinq dollars canadiens et quatre-vingt-dix-neuf cents'], [754414599, 'USD', 'sept millions cinq cent quarante-quatre mille cent quarante-cinq dollars américains et quatre-vingt-dix-neuf cents'], + [100, 'GBP', 'un pound'], + [1000, 'GBP', 'dix pounds'], + [70001, 'GBP', 'sept cents pounds et un penny'], + [700010, 'GBP', 'sept mille pounds et dix pence'], ]; } }