20 private $scopeConfigMock;
30 private $storeManagerMock;
45 private $storeConfigurationProvider;
52 $this->scopeConfigMock = $this->getMockBuilder(ScopeConfigInterface::class)
53 ->disableOriginalConstructor()
56 $this->storeManagerMock = $this->getMockBuilder(StoreManagerInterface::class)
57 ->disableOriginalConstructor()
60 $this->websiteMock = $this->getMockBuilder(WebsiteInterface::class)
61 ->disableOriginalConstructor()
64 $this->storeMock = $this->getMockBuilder(StoreInterface::class)
65 ->disableOriginalConstructor()
68 $this->configPaths = [
69 'web/unsecure/base_url',
70 'currency/options/base',
71 'general/locale/timezone' 75 $this->scopeConfigMock,
76 $this->storeManagerMock,
84 [
'web/unsecure/base_url',
'default', 0,
'127.0.0.1'],
85 [
'currency/options/base',
'default', 0,
'USD'],
86 [
'general/locale/timezone',
'default', 0,
'America/Dawson'],
87 [
'web/unsecure/base_url',
'websites', 1,
'127.0.0.2'],
88 [
'currency/options/base',
'websites', 1,
'USD'],
89 [
'general/locale/timezone',
'websites', 1,
'America/Belem'],
90 [
'web/unsecure/base_url',
'stores', 2,
'127.0.0.3'],
91 [
'currency/options/base',
'stores', 2,
'USD'],
92 [
'general/locale/timezone',
'stores', 2,
'America/Phoenix'],
95 $this->scopeConfigMock
97 ->will($this->returnValueMap(
$map));
99 $this->storeManagerMock->expects($this->once())
100 ->method(
'getWebsites')
101 ->willReturn([$this->websiteMock]);
103 $this->storeManagerMock->expects($this->once())
104 ->method(
'getStores')
105 ->willReturn([$this->storeMock]);
107 $this->websiteMock->expects($this->once())
111 $this->storeMock->expects($this->once())
114 $result = iterator_to_array($this->storeConfigurationProvider->getReport());
117 $resultValues[] = array_values(
$item);
119 array_multisort($resultValues);
120 array_multisort(
$map);
121 $this->assertEquals($resultValues,
$map);