diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2006-06-12 08:12:00 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2006-06-12 08:12:00 +0000 |
commit | e70916dae91a1ca09f7464090d1739e7acedc1c7 (patch) | |
tree | 0ccaa6aaf9f7d6f7f8c99a9d36fc41e8b0ca688e /tests/driver_gd_test.php | |
parent | 5c15063020eba2fd932b3a917b295140123bae3c (diff) | |
download | zetacomponents-graph-e70916dae91a1ca09f7464090d1739e7acedc1c7.zip zetacomponents-graph-e70916dae91a1ca09f7464090d1739e7acedc1c7.tar.gz |
- Added missing exception to autoload file
- Added test for UnsupportedImageType exception
Diffstat (limited to 'tests/driver_gd_test.php')
-rw-r--r-- | tests/driver_gd_test.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/driver_gd_test.php b/tests/driver_gd_test.php index eebda3c..af93542 100644 --- a/tests/driver_gd_test.php +++ b/tests/driver_gd_test.php @@ -27,6 +27,7 @@ class ezcGraphGdDriverTest extends ezcTestCase protected $testFiles = array( 'jpeg' => 'jpeg.jpg', 'png' => 'png.png', + 'text' => 'text.txt', ); public static function suite() @@ -414,6 +415,26 @@ class ezcGraphGdDriverTest extends ezcTestCase ); } + public function testDrawImageInvalideFileType() + { + $filename = $this->tempDir . __FUNCTION__ . '.png'; + + try { + $this->driver->drawImage( + $this->basePath . $this->testFiles['text'], + new ezcGraphCoordinate( 10, 10 ), + 100, + 50 + ); + } + catch ( ezcGraphGdDriverUnsupportedImageTypeException $e ) + { + return true; + } + + $this->fail( 'Expected ezcGraphGdDriverUnsupportedImageTypeException.' ); + } + public function testDrawImagePng() { $filename = $this->tempDir . __FUNCTION__ . '.png'; |