Skip to content

Commit

Permalink
Simplify engine reuse.
Browse files Browse the repository at this point in the history
  • Loading branch information
ndm2 committed Apr 12, 2016
1 parent 54b6182 commit bda5ff7
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions tests/TestCase/Pdf/Engine/DomPdfEngineTest.php
Expand Up @@ -110,26 +110,22 @@ public function testControlFlow()

$DomPDF = new Dompdf();

$Pdf
->engine()
$Engine = $Pdf->engine();
$Engine
->expects($this->at(0))
->method('_createInstance')
->willReturn($DomPDF);

$Pdf
->engine()
$Engine
->expects($this->at(1))
->method('_render')
->with($Pdf, $DomPDF)
->willReturn($DomPDF);

$Pdf
->engine()
$Engine
->expects($this->at(2))
->method('_output')
->with($DomPDF);

$Pdf->engine()->output();
$Engine->output();
}

/**
Expand Down

0 comments on commit bda5ff7

Please sign in to comment.