40 $this->_storeOne = $this->createMock(\
Magento\
Store\Model\Store::class);
41 $this->_storeTwo = $this->createMock(\
Magento\
Store\Model\Store::class);
42 $this->_storeManager = $this->createMock(\
Magento\
Store\Model\StoreManagerInterface::class);
43 $this->_config = $this->createMock(\
Magento\Framework\
App\
Config\ScopeConfigInterface::class);
45 $this->_model = new \Magento\Store\Model\StoresConfig(
53 $path =
'config/path';
56 ->expects($this->at(0))
58 ->will($this->returnValue(
'code_0'));
61 ->expects($this->at(1))
63 ->will($this->returnValue(0));
66 ->expects($this->at(0))
68 ->will($this->returnValue(
'code_1'));
71 ->expects($this->at(1))
73 ->will($this->returnValue(1));
76 ->expects($this->once())
79 ->will($this->returnValue([0 => $this->_storeOne, 1 => $this->_storeTwo]));
82 ->expects($this->at(0))
84 ->with(
$path,
'store',
'code_0')
85 ->will($this->returnValue(0));
88 ->expects($this->at(1))
90 ->with(
$path,
'store',
'code_1')
91 ->will($this->returnValue(1));
93 $this->assertEquals([0 => 0, 1 => 1], $this->_model->getStoresConfigByPath(
$path));
testGetStoresConfigByPath()