/** * @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); } }
public function testGetLayout() { $layout = $this->_mageModel->getLayout(); $this->assertInstanceOf('Mage_Core_Model_Layout', $layout); $this->assertSame($layout, $this->_mageModel->getLayout()); }
/** * Overriden for typehinting * * @return Mage_PHPUnit_Model_Layout * (non-PHPdoc) * @see Mage_Core_Model_App::getLayout() */ public function getLayout() { return parent::getLayout(); }
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()); }