protected function setUp() { $layoutUtility = new Mage_Core_Utility_Layout($this); $pageTypesFixture = __DIR__ . '/_files/_page_types_with_containers.xml'; $this->_block = $this->getMock('Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Chooser_Layout', array('_getLayoutUpdate'), array(array('name' => 'page_type', 'id' => 'page_types_select', 'class' => 'page-types-select', 'title' => 'Page Types Select'))); $this->_block->expects($this->any())->method('_getLayoutUpdate')->will($this->returnValue($layoutUtility->getLayoutUpdateFromFixture($pageTypesFixture))); }
public function testGetContainers() { $layoutUtility = new Mage_Core_Utility_Layout($this); $model = $layoutUtility->getLayoutUpdateFromFixture(__DIR__ . '/_files/_handles.xml'); $model->addPageHandles(array('catalog_product_view_type_configurable')); $model->load(); $expected = array('content' => 'Main Content Area', 'product.info.extrahint' => 'Product View Extra Hint', 'product.info.configurable.extra' => 'Configurable Product Extra Info'); $this->assertSame($expected, $model->getContainers()); }
public function testGetLayoutUpdateFromFixture() { $layoutUpdateFile = __DIR__ . '/_files/_layout_update.xml'; $layoutUpdate = $this->_utility->getLayoutUpdateFromFixture($layoutUpdateFile); $this->_assertLayoutUpdate($layoutUpdate, $layoutUpdateFile); }