diff options
Diffstat (limited to 'tests/renderer_2d_test.php')
-rw-r--r-- | tests/renderer_2d_test.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/renderer_2d_test.php b/tests/renderer_2d_test.php index 0773d3b..b8bb9ec 100644 --- a/tests/renderer_2d_test.php +++ b/tests/renderer_2d_test.php @@ -1530,6 +1530,26 @@ class ezcGraphRenderer2dTest extends ezcGraphTestCase ); } + public function testRenderLineChartToOutput() + { + $filename = $this->tempDir . __FUNCTION__ . '.svg'; + + $chart = new ezcGraphLineChart(); + $chart->palette = new ezcGraphPaletteBlack(); + + $chart->data['Line 1'] = new ezcGraphArrayDataSet( array( 'sample 1' => 234, 'sample 2' => 21, 'sample 3' => 324, 'sample 4' => 120, 'sample 5' => 1) ); + + ob_start(); + // Suppress header already sent warning + @$chart->renderToOutput( 500, 200 ); + file_put_contents( $filename, ob_get_clean() ); + + $this->compare( + $filename, + $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.svg' + ); + } + public function testRenderLineChart() { $filename = $this->tempDir . __FUNCTION__ . '.svg'; |