public function testConstructorStructure() { $structure = new Magento_Data_Structure(); $structure->createElement('test.container', array()); $layout = new Mage_Core_Model_Layout(array('structure' => $structure)); $this->assertTrue($layout->hasElement('test.container')); }
public function testRenameElement() { $blockName = 'block'; $expBlockName = 'block_renamed'; $containerName = 'container'; $expContainerName = 'container_renamed'; $block = $this->_layout->createBlock('Mage_Core_Block_Text', $blockName); //$this->_layout->insertContainer('', $containerName); $this->assertEquals($block, $this->_layout->getBlock($blockName)); //$this->_layout->renameElement($blockName, $expBlockName); $this->assertEquals($block, $this->_layout->getBlock($expBlockName)); $this->_layout->hasElement($containerName); //$this->_layout->renameElement($containerName, $expContainerName); $this->_layout->hasElement($expContainerName); }