From 390215cdaee149289bb414b8e63f43e74a938bbc Mon Sep 17 00:00:00 2001 From: Jelle Henkens Date: Fri, 11 May 2012 08:24:49 +0100 Subject: [PATCH] Adding test for the engine() function --- Test/Case/Pdf/CakePdfTest.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Test/Case/Pdf/CakePdfTest.php b/Test/Case/Pdf/CakePdfTest.php index e3fbab6b..d1b5c23c 100644 --- a/Test/Case/Pdf/CakePdfTest.php +++ b/Test/Case/Pdf/CakePdfTest.php @@ -36,7 +36,7 @@ public static function provider() { /** * Tests expection to be thrown for a non existing engine - + * * @expectedException Exception */ public function testNonExistingEngineException() { @@ -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