summaryrefslogtreecommitdiffstats
path: root/tests/driver_gd_test.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/driver_gd_test.php')
-rw-r--r--tests/driver_gd_test.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/driver_gd_test.php b/tests/driver_gd_test.php
index eb44084..c037bda 100644
--- a/tests/driver_gd_test.php
+++ b/tests/driver_gd_test.php
@@ -121,6 +121,29 @@ class ezcGraphGdDriverTest extends ezcTestImageCase
);
}
+ public function testRenderUnhandledFormat() {
+ $filename = $this->tempDir . __FUNCTION__ . '.jpeg';
+
+ $this->driver->options->imageFormat = IMG_GIF;
+ $this->driver->drawLine(
+ new ezcGraphCoordinate( 12, 45 ),
+ new ezcGraphCoordinate( 134, 12 ),
+ ezcGraphColor::fromHex( '#3465A4' )
+ );
+
+ try
+ {
+ $filename = $this->tempDir . __FUNCTION__ . '.jpeg';
+ $this->driver->render( $filename );
+ }
+ catch ( ezcGraphGdDriverUnsupportedImageTypeException $e )
+ {
+ return;
+ }
+
+ $this->fail( 'Expected ezcGraphGdDriverUnsupportedImageTypeException.' );
+ }
+
public function testDrawLine()
{
$filename = $this->tempDir . __FUNCTION__ . '.png';
OpenPOWER on IntegriCloud