Skip to content

Commit 5b0891d

Browse files
ENGCOM-6324: Fix #24713 - Symbol of the Belarusian currency BYR is outdated #25723
- Merge Pull Request #25723 from Bartlomiejsz/magento2:feature/fix_24713_belarusian_currency_outdated - Merged commits: 1. 9348fb8
2 parents 1ad65a3 + 9348fb8 commit 5b0891d

File tree

6 files changed

+25
-20
lines changed

6 files changed

+25
-20
lines changed

app/code/Magento/Dhl/Test/Unit/Model/_files/countries.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@
216216
<name>Botswana</name>
217217
</BW>
218218
<BY>
219-
<currency>BYR</currency>
219+
<currency>BYN</currency>
220220
<weight_unit>KG</weight_unit>
221221
<measure_unit>CM</measure_unit>
222222
<region>AP</region>

app/code/Magento/Dhl/etc/countries.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@
216216
<name>Botswana</name>
217217
</BW>
218218
<BY>
219-
<currency>BYR</currency>
219+
<currency>BYN</currency>
220220
<weight_unit>KG</weight_unit>
221221
<measure_unit>CM</measure_unit>
222222
<region>AP</region>

app/code/Magento/Directory/etc/config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<default>
1010
<system>
1111
<currency>
12-
<installed>AZN,AZM,AFN,ALL,DZD,AOA,ARS,AMD,AWG,AUD,BSD,BHD,BDT,BBD,BYR,BZD,BMD,BTN,BOB,BAM,BWP,BRL,GBP,BND,BGN,BUK,BIF,KHR,CAD,CVE,CZK,KYD,CLP,CNY,COP,KMF,CDF,CRC,HRK,CUP,DKK,DJF,DOP,XCD,EGP,SVC,GQE,ERN,EEK,ETB,EUR,FKP,FJD,GMD,GEK,GEL,GHS,GIP,GTQ,GNF,GYD,HTG,HNL,HKD,HUF,ISK,INR,IDR,IRR,IQD,ILS,JMD,JPY,JOD,KZT,KES,KWD,KGS,LAK,LVL,LBP,LSL,LRD,LYD,LTL,MOP,MKD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currency>

app/code/Magento/GraphQl/etc/schema.graphqls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ enum CurrencyEnum @doc(description: "The list of available currency codes") {
113113
BHD
114114
BDT
115115
BBD
116-
BYR
116+
BYN
117117
BZD
118118
BMD
119119
BTN

lib/internal/Magento/Framework/Locale/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class Config implements \Magento\Framework\Locale\ConfigInterface
129129
'BHD', /*Bahraini Dinar*/
130130
'BDT', /*Bangladesh Taka*/
131131
'BBD', /*Barbados Dollar*/
132-
'BYR', /*Belarussian Ruble*/
132+
'BYN', /*Belarussian Ruble*/
133133
'BZD', /*Belize Dollar*/
134134
'BMD', /*Bermudan Dollar*/
135135
'BTN', /*Bhutan Ngultrum*/

lib/internal/Magento/Framework/Locale/Test/Unit/ConfigTest.php

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66

77
namespace Magento\Framework\Locale\Test\Unit;
88

9-
class ConfigTest extends \PHPUnit\Framework\TestCase
9+
use Magento\Framework\Locale\Config;
10+
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
11+
use PHPUnit\Framework\TestCase;
12+
13+
class ConfigTest extends TestCase
1014
{
1115
private static $allAllowedLocales = [
1216
'af_ZA', 'ar_DZ', 'ar_EG', 'ar_KW', 'ar_MA', 'ar_SA', 'az_Latn_AZ', 'be_BY', 'bg_BG', 'bn_BD',
@@ -22,7 +26,7 @@ class ConfigTest extends \PHPUnit\Framework\TestCase
2226

2327
private static $allAllowedCurrencies = [
2428
'AFN', 'ALL', 'AZN', 'DZD', 'AOA', 'ARS', 'AMD', 'AWG', 'AUD', 'BSD',
25-
'BHD', 'BDT', 'BBD', 'BYR', 'BZD', 'BMD', 'BTN', 'BOB', 'BAM', 'BWP',
29+
'BHD', 'BDT', 'BBD', 'BYN', 'BZD', 'BMD', 'BTN', 'BOB', 'BAM', 'BWP',
2630
'BRL', 'GBP', 'BND', 'BGN', 'BUK', 'BIF', 'KHR', 'CAD', 'CVE', 'CZK',
2731
'KYD', 'GQE', 'CLP', 'CNY', 'COP', 'KMF', 'CDF', 'CRC', 'HRK', 'CUP',
2832
'DKK', 'DJF', 'DOP', 'XCD', 'EGP', 'SVC', 'ERN', 'EEK', 'ETB', 'EUR',
@@ -67,13 +71,14 @@ class ConfigTest extends \PHPUnit\Framework\TestCase
6771
'QED', 'PNP', 'EJN', 'MTO', 'EBY',
6872
];
6973

70-
/** @var \Magento\Framework\Locale\Config */
74+
/**
75+
* @var Config
76+
*/
7177
private $configObject;
7278

7379
public function testGetAllowedLocalesNoDataArray()
7480
{
75-
$this->configObject = (new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this))
76-
->getObject(\Magento\Framework\Locale\Config::class);
81+
$this->configObject = (new ObjectManager($this))->getObject(Config::class);
7782

7883
$retrievedLocales = $this->configObject->getAllowedLocales();
7984

@@ -88,9 +93,9 @@ public function testGetAllowedLocalesNoDataArray()
8893

8994
public function testGetAllowedLocalesGivenDataArray()
9095
{
91-
$this->configObject = (new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this))
96+
$this->configObject = (new ObjectManager($this))
9297
->getObject(
93-
\Magento\Framework\Locale\Config::class,
98+
Config::class,
9499
[
95100
'data' => [
96101
'allowedLocales' => $this::$sampleAdditionalLocales,
@@ -114,9 +119,9 @@ public function testGetAllowedLocalesGivenDataArray()
114119

115120
public function testGetAllowedLocalesGivenRedundantDataArray()
116121
{
117-
$this->configObject = (new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this))
122+
$this->configObject = (new ObjectManager($this))
118123
->getObject(
119-
\Magento\Framework\Locale\Config::class,
124+
Config::class,
120125
[
121126
'data' => [
122127
'allowedLocales' => $this::$samplePresentLocales,
@@ -140,8 +145,8 @@ public function testGetAllowedLocalesGivenRedundantDataArray()
140145

141146
public function testGetAllowedCurrenciesNoDataArray()
142147
{
143-
$this->configObject = (new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this))
144-
->getObject(\Magento\Framework\Locale\Config::class);
148+
$this->configObject = (new ObjectManager($this))
149+
->getObject(Config::class);
145150

146151
$retrievedCurrencies = $this->configObject->getAllowedCurrencies();
147152

@@ -156,9 +161,9 @@ public function testGetAllowedCurrenciesNoDataArray()
156161

157162
public function testGetAllowedCurrenciesGivenDataArray()
158163
{
159-
$this->configObject = (new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this))
164+
$this->configObject = (new ObjectManager($this))
160165
->getObject(
161-
\Magento\Framework\Locale\Config::class,
166+
Config::class,
162167
[
163168
'data' => [
164169
'allowedCurrencies' => $this::$sampleAdditionalCurrencies,
@@ -182,9 +187,9 @@ public function testGetAllowedCurrenciesGivenDataArray()
182187

183188
public function testGetAllowedCurrenciesGivenRedundantDataArray()
184189
{
185-
$this->configObject = (new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this))
190+
$this->configObject = (new ObjectManager($this))
186191
->getObject(
187-
\Magento\Framework\Locale\Config::class,
192+
Config::class,
188193
[
189194
'data' => [
190195
'allowedCurrencies' => $this::$samplePresentCurrencies,

0 commit comments

Comments
 (0)