diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2008-05-03 18:29:35 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2008-05-03 18:29:35 +0000 |
commit | 639d72f8b822bf105d9c8be01a4fa27452b7beee (patch) | |
tree | 3ab33bc6c147ed2eee3e23d08d03ebe4a0f6c534 /tests/driver_gd_test.php | |
parent | cce8cbce35d5b21fcc2a9ccb7a62d398e7501594 (diff) | |
download | zetacomponents-graph-639d72f8b822bf105d9c8be01a4fa27452b7beee.zip zetacomponents-graph-639d72f8b822bf105d9c8be01a4fa27452b7beee.tar.gz |
- Implemented feature #10829: Get resource from driver
Diffstat (limited to 'tests/driver_gd_test.php')
-rw-r--r-- | tests/driver_gd_test.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/driver_gd_test.php b/tests/driver_gd_test.php index 70a0211..e01193a 100644 --- a/tests/driver_gd_test.php +++ b/tests/driver_gd_test.php @@ -92,6 +92,26 @@ class ezcGraphGdDriverTest extends ezcTestImageCase ); } + public function testGetResource() + { + $this->driver->drawLine( + new ezcGraphCoordinate( 12, 45 ), + new ezcGraphCoordinate( 134, 12 ), + ezcGraphColor::fromHex( '#3465A4' ) + ); + + ob_start(); + // Suppress header already sent warning + @$this->driver->renderToOutput(); + ob_end_clean(); + + $resource = $this->driver->getResource(); + $this->assertEquals( + 'resource', + gettype( $resource ) + ); + } + public function testRenderJpegToOutput() { $filename = $this->tempDir . __FUNCTION__ . '.jpeg'; |