summaryrefslogtreecommitdiffstats
path: root/tests/driver_cairo_test.php
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2008-05-03 18:29:35 +0000
committerKore Nordmann <github@kore-nordmann.de>2008-05-03 18:29:35 +0000
commit639d72f8b822bf105d9c8be01a4fa27452b7beee (patch)
tree3ab33bc6c147ed2eee3e23d08d03ebe4a0f6c534 /tests/driver_cairo_test.php
parentcce8cbce35d5b21fcc2a9ccb7a62d398e7501594 (diff)
downloadzetacomponents-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.php24
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';
OpenPOWER on IntegriCloud