27 $this->contextMock = $this->getMockBuilder(\
Magento\Framework\View\Element\Template\Context::class)
28 ->disableOriginalConstructor()
30 $this->frontendStorageConfigurationPoolMock = $this
31 ->getMockBuilder(\
Magento\Catalog\Model\FrontendStorageConfigurationPool::class)
32 ->disableOriginalConstructor()
35 $this->objectManagerHelper =
new ObjectManagerHelper($this);
36 $this->model = $this->objectManagerHelper->getObject(
37 \
Magento\Catalog\Block\FrontendStorageManager::class,
39 'context' => $this->contextMock,
40 'storageConfigurationPool' => $this->frontendStorageConfigurationPoolMock
47 $dynamicStorage = $this->getMockBuilder(FrontendStorageConfigurationInterface::class)
48 ->disableOriginalConstructor()
49 ->getMockForAbstractClass();
52 'first' =>
'data_before',
57 $this->frontendStorageConfigurationPoolMock->expects($this->exactly(2))
59 ->withConsecutive([
'first_key'], [
'second_key'])
60 ->willReturnOnConsecutiveCalls($dynamicStorage,
null);
61 $dynamicStorage->expects($this->once())
63 ->willReturn([
'second' =>
'data']);
68 'first' =>
'data_before',
70 'allowToSendRequest' =>
null,
73 'allowToSendRequest' =>
null,
76 json_decode($this->model->getConfigurationJson(),
true)
testGetConfigurationJson()
$frontendStorageConfigurationPoolMock