Exemplo n.º 1
0
 public function testGetMethodTitleAndMethodLabelAfterHtml()
 {
     $expectedTitle = 'Free Method';
     $expectedLabel = 'Label After Html';
     $method = Mage::getModel('Mage_Payment_Model_Method_Free');
     $block = $this->_block->getLayout()->createBlock('Mage_Core_Block_Text')->setMethodTitle($expectedTitle)->setMethodLabelAfterHtml($expectedLabel);
     $this->assertEquals('No Payment Information Required', $this->_block->getMethodTitle($method));
     $this->_block->setChild('payment.method.free', $block);
     $actualTitle = $this->_block->getMethodTitle($method);
     $actualLabel = $this->_block->getMethodLabelAfterHtml($method);
     $this->assertEquals($expectedTitle, $actualTitle);
     $this->assertEquals($expectedLabel, $actualLabel);
 }