diff --git a/testes/Render/PdfTest.php b/testes/Render/PdfTest.php index f13e1a8..724eedc 100644 --- a/testes/Render/PdfTest.php +++ b/testes/Render/PdfTest.php @@ -15,25 +15,20 @@ public static function setUpBeforeClass() { public function testDeveCriarOpdfApartirDoHtml() { $dom = $this->createMock('\DOMPDF'); - $dom->expects($this->once()) - ->method('render'); $html = $this->createMock('\Sped\Gnre\Render\Html'); - $html->expects($this->once()) - ->method('getHtml') - ->will($this->returnValue('
Guia GNRE
')); - $pdf = $this->createMock('\Sped\Gnre\Render\Pdf', array('getDomPdf')); + $pdf = $this->createMock('\Sped\Gnre\Render\Pdf'); $pdf->expects($this->once()) - ->method('getDomPdf') + ->method('create') ->will($this->returnValue($dom)); $domPdf = $pdf->create($html); $this->assertInstanceOf('\DOMPDF', $domPdf); } - + public function testDeveRetornarUmaInstanciaDoDomPdf() { $dom = new CoveragePdf(); $this->assertInstanceOf('\DOMPDF', $dom->getDomPdf()); @@ -42,9 +37,9 @@ public function testDeveRetornarUmaInstanciaDoDomPdf() { } class CoveragePdf extends \Sped\Gnre\Render\Pdf { - + public function getDomPdf() { return parent::getDomPdf(); } - + } \ No newline at end of file