Ejemplo n.º 1
0
 public function testGetInvoiceCommentsHtml()
 {
     $childBlock = $this->_layout->addBlock('Mage_Core_Block_Text', 'invoice_comments', 'block');
     $expectedHtml = '<b>Any html</b>';
     $this->assertEmpty($childBlock->getEntity());
     $this->assertEmpty($childBlock->getTitle());
     $this->assertNotEquals($expectedHtml, $this->_block->getInvoiceCommentsHtml($this->_invoice));
     $childBlock->setText($expectedHtml);
     $actualHtml = $this->_block->getInvoiceCommentsHtml($this->_invoice);
     $this->assertSame($this->_invoice, $childBlock->getEntity());
     $this->assertNotEmpty($childBlock->getTitle());
     $this->assertEquals($expectedHtml, $actualHtml);
 }