diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2007-11-27 11:37:33 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2007-11-27 11:37:33 +0000 |
commit | e5a027b7694db1836398c6be589972ae8b46c153 (patch) | |
tree | 9eeb371775ff76d2ea4b16ded5229cea03307999 /tests | |
parent | fc7c6ba47ab918807bdf525906d8608d8aebe211 (diff) | |
download | zetacomponents-graph-e5a027b7694db1836398c6be589972ae8b46c153.zip zetacomponents-graph-e5a027b7694db1836398c6be589972ae8b46c153.tar.gz |
- Test for invalid id exception
Diffstat (limited to 'tests')
-rw-r--r-- | tests/driver_svg_test.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/driver_svg_test.php b/tests/driver_svg_test.php index 16dedff..e385ea6 100644 --- a/tests/driver_svg_test.php +++ b/tests/driver_svg_test.php @@ -1279,6 +1279,33 @@ class ezcGraphSvgDriverTest extends ezcGraphTestCase ); } + public function testDrawChartInTemplateUnknownGroup() + { + $chart = new ezcGraphPieChart(); + $chart->data['sample'] = new ezcGraphArrayDataSet( array( + 'Mozilla' => 4375, + 'IE' => 345, + 'Opera' => 1204, + 'wget' => 231, + 'Safari' => 987, + ) ); + + $chart->driver = new ezcGraphSvgDriver(); + $chart->driver->options->templateDocument = dirname( __FILE__ ) . '/data/template.svg'; + $chart->driver->options->insertIntoGroup = 'not_existing_group'; + + try + { + $chart->render( 500, 300 ); + } + catch ( ezcGraphSvgDriverInvalidIdException $e ) + { + return; + } + + $this->fail( 'Expected ezcGraphSvgDriverInvalidIdException.' ); + } + public function testDrawChartWithCustomPrefix() { $filename = $this->tempDir . __FUNCTION__ . '.svg'; |