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_cairo_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_cairo_test.php')
-rw-r--r-- | tests/driver_cairo_test.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/driver_cairo_test.php b/tests/driver_cairo_test.php index 854c551..2b902fc 100644 --- a/tests/driver_cairo_test.php +++ b/tests/driver_cairo_test.php @@ -87,6 +87,30 @@ class ezcGraphCairoDriverTest 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->assertSame( + 'resource', + gettype( $resource['surface'] ) + ); + $this->assertSame( + 'resource', + gettype( $resource['context'] ) + ); + } + public function testDrawLine() { $filename = $this->tempDir . __FUNCTION__ . '.png'; |