Skip to content

Commit a92a3b2

Browse files
committed
[Forwardport] Remove not-allowed currencies from the currencies dropdown in Setup.
Cover code changes with unit test.
1 parent 3293254 commit a92a3b2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/internal/Magento/Framework/Setup/Test/Unit/ListsTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ protected function setUp()
5858
$this->mockConfig->expects($this->any())
5959
->method('getAllowedLocales')
6060
->willReturn($this->expectedLocales);
61+
$this->mockConfig->expects($this->any())
62+
->method('getAllowedCurrencies')
63+
->willReturn($this->expectedCurrencies);
6164

6265
$this->lists = new Lists($this->mockConfig);
6366
}
@@ -73,4 +76,13 @@ public function testGetLocaleList()
7376
$locales = array_intersect($this->expectedLocales, array_keys($this->lists->getLocaleList()));
7477
$this->assertEquals($this->expectedLocales, $locales);
7578
}
79+
80+
/**
81+
* Test Lists:getCurrencyList() considering allowed currencies config values.
82+
*/
83+
public function testGetCurrencyList()
84+
{
85+
$currencies = array_intersect($this->expectedCurrencies, array_keys($this->lists->getCurrencyList()));
86+
$this->assertEquals($this->expectedCurrencies, $currencies);
87+
}
7688
}

0 commit comments

Comments
 (0)