Skip to content

Commit e56cbde

Browse files
author
al.kravchuk
committed
magento/magento2#?: 'Allowed Countries' - get countries for scope 'default'.
- add tests
1 parent 72cb244 commit e56cbde

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

app/code/Magento/Directory/Test/Unit/Model/AllowedCountriesTest.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,20 @@ public function testGetAllowedCountries()
7070
$this->allowedCountriesReader->getAllowedCountries(ScopeInterface::SCOPE_WEBSITE, true)
7171
);
7272
}
73+
74+
public function testGetAllowedCountriesDefaultScope()
75+
{
76+
$this->storeManagerMock->expects($this->never())
77+
->method('getStore');
78+
79+
$this->scopeConfigMock->expects($this->once())
80+
->method('getValue')
81+
->with(AllowedCountries::ALLOWED_COUNTRIES_PATH, ScopeInterface::SCOPE_STORE, 0)
82+
->willReturn('AM');
83+
84+
$this->assertEquals(
85+
['AM' => 'AM'],
86+
$this->allowedCountriesReader->getAllowedCountries(ScopeInterface::SCOPE_STORE, 0)
87+
);
88+
}
7389
}

0 commit comments

Comments
 (0)