Skip to content

Commit

Permalink
Adding test for the engine() function
Browse files Browse the repository at this point in the history
  • Loading branch information
Jelle Henkens committed May 11, 2012
1 parent a6fb4ad commit 390215c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Test/Case/Pdf/CakePdfTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static function provider() {

/**
* Tests expection to be thrown for a non existing engine
*
* @expectedException Exception
*/
public function testNonExistingEngineException() {
Expand All @@ -45,6 +45,17 @@ public function testNonExistingEngineException() {
$pdf = new CakePdf($config);
}

/**
* Tests that engine returns the proper object
*
* @dataProvider provider
*/
public function testEngine($config) {
$pdf = new CakePdf($config);
$engine = $pdf->engine();
$this->assertEqual('PdfTestEngine', get_class($engine));
}

/**
*
* @dataProvider provider
Expand Down

0 comments on commit 390215c

Please sign in to comment.