Example #1
0
 /**
  * App isolation is enabled, because config options object is affected
  *
  * @magentoAppIsolation enabled
  */
 public function testGetVar()
 {
     Mage::getConfig()->getOptions()->setDesignDir(dirname(__DIR__) . '/Model/_files/design');
     Mage::getDesign()->setDesignTheme('test/default/default');
     $this->assertEquals('Core Value1', $this->_block->getVar('var1'));
     $this->assertEquals('value1', $this->_block->getVar('var1', 'Namespace_Module'));
     $this->_block->setModuleName('Namespace_Module');
     $this->assertEquals('value1', $this->_block->getVar('var1'));
     $this->assertEquals(false, $this->_block->getVar('unknown_var'));
 }
Example #2
0
 /**
  * App isolation is enabled, because config options object is affected
  *
  * @magentoAppIsolation enabled
  * @magentoDbIsolation enabled
  */
 public function testGetVar()
 {
     /** @var $themeUtility Mage_Core_Utility_Theme */
     $themeUtility = Mage::getModel('Mage_Core_Utility_Theme', array(dirname(__DIR__) . '/Model/_files/design/'));
     $themeUtility->registerThemes()->setDesignTheme('test/default', 'frontend');
     $this->assertEquals('Core Value1', $this->_block->getVar('var1'));
     $this->assertEquals('value1', $this->_block->getVar('var1', 'Namespace_Module'));
     $this->_block->setModuleName('Namespace_Module');
     $this->assertEquals('value1', $this->_block->getVar('var1'));
     $this->assertEquals(false, $this->_block->getVar('unknown_var'));
 }