コード例 #1
0
 /**
  * @covers Mage_Sales_Block_Adminhtml_Report_Filter_Form_Coupon::_afterToHtml
  */
 public function testAfterToHtml()
 {
     /** @var $block Mage_Sales_Block_Adminhtml_Report_Filter_Form_Coupon */
     $block = $this->_application->getLayout()->createBlock('Mage_Sales_Block_Adminhtml_Report_Filter_Form_Coupon');
     $block->setFilterData(new Varien_Object());
     $html = $block->toHtml();
     $expectedStrings = array('FormElementDependenceController', 'sales_report_rules_list', 'sales_report_price_rule_type');
     foreach ($expectedStrings as $expectedString) {
         $this->assertContains($expectedString, $html);
     }
 }
コード例 #2
0
ファイル: AppTest.php プロジェクト: nemphys/magento2
 public function testGetLayout()
 {
     $layout = $this->_mageModel->getLayout();
     $this->assertInstanceOf('Mage_Core_Model_Layout', $layout);
     $this->assertSame($layout, $this->_mageModel->getLayout());
 }
コード例 #3
0
ファイル: App.php プロジェクト: NatashaOlut/Mage_Test
 /**
  * Overriden for typehinting
  *
  * @return Mage_PHPUnit_Model_Layout
  * (non-PHPdoc)
  * @see Mage_Core_Model_App::getLayout()
  */
 public function getLayout()
 {
     return parent::getLayout();
 }
コード例 #4
0
 public function testGetLayout()
 {
     $this->_objectManager->expects($this->once())->method('get')->with('Mage_Core_Model_Layout')->will($this->returnValue(self::LAYOUT_INSTANCE));
     $this->assertEquals(self::LAYOUT_INSTANCE, $this->_model->getLayout());
 }