22 $this->localeListsMock = $this->createMock(\
Magento\Framework\Locale\ListsInterface::class);
24 $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
26 \
Magento\Directory\Model\Country::class,
27 [
'localeLists' => $this->localeListsMock]
33 $this->localeListsMock->expects($this->once())
34 ->method(
'getCountryTranslation')
36 ->willReturn(
'United States');
38 $this->country->setId(1);
39 $this->assertEquals(
'United States', $this->country->getName());
44 $this->localeListsMock->expects($this->once())
45 ->method(
'getCountryTranslation')
47 ->willReturn(
'Vereinigte Staaten');
49 $this->country->setId(1);
50 $this->assertEquals(
'Vereinigte Staaten', $this->country->getName(
'de_DE'));