Skip to content

Commit ebfec11

Browse files
author
Igor Miniailo
committed
Fixed MAGETWO-44938: Products aren't shown on frontend
1 parent 908a67c commit ebfec11

File tree

1 file changed

+3
-25
lines changed
  • dev/tests/integration/testsuite/Magento/Theme/Model/View

1 file changed

+3
-25
lines changed

dev/tests/integration/testsuite/Magento/Theme/Model/View/DesignTest.php

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -174,31 +174,9 @@ public function getFilenameDataProvider()
174174
public function testGetViewConfig()
175175
{
176176
$this->_emulateFixtureTheme();
177-
/** @var $theme \Magento\Framework\View\Design\ThemeInterface */
178-
$theme = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
179-
'Magento\Framework\View\DesignInterface'
180-
)->getDesignTheme();
181-
$customConfigFile = $theme->getCustomization()->getCustomViewConfigPath();
182-
/** @var $filesystem \Magento\Framework\Filesystem */
183-
$filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
184-
->create('Magento\Framework\Filesystem');
185-
$directory = $filesystem->getDirectoryWrite(DirectoryList::ROOT);
186-
$relativePath = $directory->getRelativePath($customConfigFile);
187-
try {
188-
$directory->writeFile(
189-
$relativePath,
190-
'<?xml version="1.0" encoding="UTF-8"?>
191-
<view><vars module="Namespace_Module"><var name="var">var value</var></vars></view>'
192-
);
193-
194-
$config = $this->_viewConfig->getViewConfig();
195-
$this->assertInstanceOf('Magento\Framework\Config\View', $config);
196-
$this->assertEquals('var value', $config->getVarValue('Namespace_Module', 'var'));
197-
} catch (\Exception $e) {
198-
$directory->delete($relativePath);
199-
throw $e;
200-
}
201-
$directory->delete($relativePath);
177+
$config = $this->_viewConfig->getViewConfig();
178+
$this->assertInstanceOf('Magento\Framework\Config\View', $config);
179+
$this->assertEquals(['var1' => 'value1', 'var2' => 'value2'], $config->getVars('Namespace_Module'));
202180
}
203181

204182
/**

0 commit comments

Comments
 (0)