Skip to content

Fix #24713 - Symbol of the Belarusian currency BYR is outdated #25723

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/code/Magento/Dhl/Test/Unit/Model/_files/countries.xml
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
<name>Botswana</name>
</BW>
<BY>
<currency>BYR</currency>
<currency>BYN</currency>
<weight_unit>KG</weight_unit>
<measure_unit>CM</measure_unit>
<region>AP</region>
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Dhl/etc/countries.xml
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
<name>Botswana</name>
</BW>
<BY>
<currency>BYR</currency>
<currency>BYN</currency>
<weight_unit>KG</weight_unit>
<measure_unit>CM</measure_unit>
<region>AP</region>
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Directory/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<default>
<system>
<currency>
<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,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
2 changes: 1 addition & 1 deletion app/code/Magento/GraphQl/etc/schema.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ enum CurrencyEnum @doc(description: "The list of available currency codes") {
BHD
BDT
BBD
BYR
BYN
BZD
BMD
BTN
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/Magento/Framework/Locale/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class Config implements \Magento\Framework\Locale\ConfigInterface
'BHD', /*Bahraini Dinar*/
'BDT', /*Bangladesh Taka*/
'BBD', /*Barbados Dollar*/
'BYR', /*Belarussian Ruble*/
'BYN', /*Belarussian Ruble*/
'BZD', /*Belize Dollar*/
'BMD', /*Bermudan Dollar*/
'BTN', /*Bhutan Ngultrum*/
Expand Down
35 changes: 20 additions & 15 deletions lib/internal/Magento/Framework/Locale/Test/Unit/ConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@

namespace Magento\Framework\Locale\Test\Unit;

class ConfigTest extends \PHPUnit\Framework\TestCase
use Magento\Framework\Locale\Config;
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
use PHPUnit\Framework\TestCase;

class ConfigTest extends TestCase
{
private static $allAllowedLocales = [
'af_ZA', 'ar_DZ', 'ar_EG', 'ar_KW', 'ar_MA', 'ar_SA', 'az_Latn_AZ', 'be_BY', 'bg_BG', 'bn_BD',
Expand All @@ -22,7 +26,7 @@ class ConfigTest extends \PHPUnit\Framework\TestCase

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

/** @var \Magento\Framework\Locale\Config */
/**
* @var Config
*/
private $configObject;

public function testGetAllowedLocalesNoDataArray()
{
$this->configObject = (new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this))
->getObject(\Magento\Framework\Locale\Config::class);
$this->configObject = (new ObjectManager($this))->getObject(Config::class);

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

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

public function testGetAllowedLocalesGivenDataArray()
{
$this->configObject = (new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this))
$this->configObject = (new ObjectManager($this))
->getObject(
\Magento\Framework\Locale\Config::class,
Config::class,
[
'data' => [
'allowedLocales' => $this::$sampleAdditionalLocales,
Expand All @@ -114,9 +119,9 @@ public function testGetAllowedLocalesGivenDataArray()

public function testGetAllowedLocalesGivenRedundantDataArray()
{
$this->configObject = (new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this))
$this->configObject = (new ObjectManager($this))
->getObject(
\Magento\Framework\Locale\Config::class,
Config::class,
[
'data' => [
'allowedLocales' => $this::$samplePresentLocales,
Expand All @@ -140,8 +145,8 @@ public function testGetAllowedLocalesGivenRedundantDataArray()

public function testGetAllowedCurrenciesNoDataArray()
{
$this->configObject = (new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this))
->getObject(\Magento\Framework\Locale\Config::class);
$this->configObject = (new ObjectManager($this))
->getObject(Config::class);

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

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

public function testGetAllowedCurrenciesGivenDataArray()
{
$this->configObject = (new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this))
$this->configObject = (new ObjectManager($this))
->getObject(
\Magento\Framework\Locale\Config::class,
Config::class,
[
'data' => [
'allowedCurrencies' => $this::$sampleAdditionalCurrencies,
Expand All @@ -182,9 +187,9 @@ public function testGetAllowedCurrenciesGivenDataArray()

public function testGetAllowedCurrenciesGivenRedundantDataArray()
{
$this->configObject = (new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this))
$this->configObject = (new ObjectManager($this))
->getObject(
\Magento\Framework\Locale\Config::class,
Config::class,
[
'data' => [
'allowedCurrencies' => $this::$samplePresentCurrencies,
Expand Down