예제 #1
0
 public function testGetLayoutFromFixture()
 {
     $layoutUpdateFile = __DIR__ . '/_files/_layout_update.xml';
     $layout = $this->_utility->getLayoutFromFixture($layoutUpdateFile, $this->_utility->getLayoutDependencies());
     $this->assertInstanceOf('Mage_Core_Model_Layout', $layout);
     $this->_assertLayoutUpdate($layout->getUpdate(), $layoutUpdateFile);
 }
예제 #2
0
 protected function setUp()
 {
     $layoutUtility = new Mage_Core_Utility_Layout($this);
     $pageTypesFixture = __DIR__ . '/_files/_page_types_with_containers.xml';
     $args = array_merge($this->_prepareConstructorArguments(), array(array('name' => 'page_type', 'id' => 'page_types_select', 'class' => 'page-types-select', 'title' => 'Page Types Select')));
     $this->_block = $this->getMock('Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Chooser_Layout', array('_getLayoutMerge'), $args);
     $this->_block->expects($this->any())->method('_getLayoutMerge')->will($this->returnValue($layoutUtility->getLayoutUpdateFromFixture($pageTypesFixture, $layoutUtility->getLayoutDependencies())));
 }
예제 #3
0
 /**
  * @expectedException Magento_Exception
  */
 public function testGetBlockUnscheduledException()
 {
     $utility = new Mage_Core_Utility_Layout($this);
     $layout = $utility->getLayoutFromFixture(__DIR__ . '/_files/valid_layout_updates.xml', $utility->getLayoutDependencies());
     $layout->getUpdate()->load(array('get_block_special_case_exception'));
     $layout->generateXml();
     $layout->generateElements();
 }