コード例 #1
0
ファイル: FilterTest.php プロジェクト: nemphys/magento2
 /**
  * @magentoAppIsolation enabled
  * @dataProvider layoutDirectiveDataProvider
  *
  * @param string $currentArea
  * @param string $directiveParams
  * @param string $expectedOutput
  */
 public function testLayoutDirective($currentArea, $directiveParams, $expectedOutput)
 {
     $this->_emulateCurrentArea($currentArea);
     Mage::getConfig()->setOptions(array('design_dir' => dirname(__DIR__) . '/_files/design'));
     Mage::getDesign()->setDesignTheme('test/default/default');
     $actualOutput = $this->_model->layoutDirective(array('{{layout ' . $directiveParams . '}}', 'layout', ' ' . $directiveParams));
     $this->assertEquals($expectedOutput, trim($actualOutput));
 }
コード例 #2
0
ファイル: FilterTest.php プロジェクト: natxetee/magento2
 /**
  * @magentoDbIsolation enabled
  * @magentoAppIsolation enabled
  * @magentoConfigFixture default_store design/theme/full_name test/default
  * @magentoConfigFixture adminhtml/design/theme/full_name test/default
  * @dataProvider layoutDirectiveDataProvider
  *
  * @param string $currentArea
  * @param string $directiveParams
  * @param string $expectedOutput
  */
 public function testLayoutDirective($currentArea, $directiveParams, $expectedOutput)
 {
     /** @var $themeUtility Mage_Core_Utility_Theme */
     $themeUtility = Mage::getModel('Mage_Core_Utility_Theme', array(dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'design'));
     $themeUtility->registerThemes()->setDesignTheme('test/default', 'frontend')->setDesignTheme('test/default', 'adminhtml');
     $this->_emulateCurrentArea($currentArea);
     $actualOutput = $this->_model->layoutDirective(array('{{layout ' . $directiveParams . '}}', 'layout', ' ' . $directiveParams));
     $this->assertEquals($expectedOutput, trim($actualOutput));
 }
コード例 #3
0
ファイル: Filter.php プロジェクト: Rodrifer/candyclub
 /**
  * @param Mage_Sales_Model_Order_Creditmemo $creditmemo
  *
  * @return String                            containing HTML for credit memo items
  */
 protected function _filterCreditmemoItems(Mage_Sales_Model_Order_Creditmemo $creditmemo)
 {
     $html = parent::layoutDirective(array(2 => ' handle="sales_email_order_creditmemo_items" creditmemo=$creditmemo order=$order'));
     return $this->_applyInlineCssStyles($html);
 }