public function testGetViewConfig() { $config = $this->_model->getViewConfig(); $this->assertInstanceOf('Magento_Config_View', $config); $this->assertEquals(array('var1' => 'value1', 'var2' => 'value2'), $config->getVars('Namespace_Module')); }
/** * Get variable value from view configuration * * Module name can be omitted. If omitted, it will be determined automatically. * * @param string $name variable name * @param string $module optional module name * @return string|false */ public function getVar($name, $module = null) { $module = $module ?: $this->getModuleName(); return $this->_designPackage->getViewConfig()->getVarValue($module, $name); }