コード例 #1
0
ファイル: MergeTest.php プロジェクト: nickimproove/magento2
 public function testFetchDbLayoutUpdates()
 {
     $update = '<reference name="root"><block type="Mage_Core_Block_Template" template="dummy.phtml"/></reference>';
     $layoutUpdate = Mage::getModel('Mage_Core_Model_Layout_Update')->setData(array('handle' => 'fixture_handle', 'xml' => $update, 'sort_order' => 0, 'store_id' => 1, 'theme_id' => Mage::getDesign()->getDesignTheme()->getId()));
     $layoutUpdate->save();
     $this->_model->load('fixture_handle');
     $this->assertStringMatchesFormat('<reference name="root">%w<block type="Mage_Core_Block_Template" template="dummy.phtml"/>%w</reference>', trim($this->_model->asString()));
 }
コード例 #2
0
ファイル: MergeTest.php プロジェクト: nayanchamp/magento2
 /**
  * @magentoDataFixture Mage/Core/Model/Layout/_files/db_layout_update.php
  */
 public function testFetchDbLayoutUpdates()
 {
     $this->_model->load('fixture_handle');
     $this->assertStringMatchesFormat('<reference name="root">%w<block type="Mage_Core_Block_Template" template="dummy.phtml"/>%w</reference>', trim($this->_model->asString()));
 }