diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2006-05-16 08:39:55 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2006-05-16 08:39:55 +0000 |
commit | b502e943cbdc85b1489e933c434f4eade04ec6ab (patch) | |
tree | f4d1409af35a0364561f5400026ea07a995d652e /tests/labeled_axis_test.php | |
parent | 87c1ed6ce0813da4eafbd26a422846ab8b2ac808 (diff) | |
download | zetacomponents-graph-b502e943cbdc85b1489e933c434f4eade04ec6ab.zip zetacomponents-graph-b502e943cbdc85b1489e933c434f4eade04ec6ab.tar.gz |
- Implemented automatic label setting from datasets for labeled_axis
Diffstat (limited to 'tests/labeled_axis_test.php')
-rw-r--r-- | tests/labeled_axis_test.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/labeled_axis_test.php b/tests/labeled_axis_test.php index 421d639..62f5049 100644 --- a/tests/labeled_axis_test.php +++ b/tests/labeled_axis_test.php @@ -56,6 +56,7 @@ class ezcGraphLabeledAxisTest extends ezcTestCase { $chart = ezcGraph::create( 'Line' ); $chart->sample = array( 2000 => 20, 70, 12, 130 ); + $chart->render(); } catch ( Exception $e ) { @@ -80,6 +81,7 @@ class ezcGraphLabeledAxisTest extends ezcTestCase $chart = ezcGraph::create( 'Line' ); $chart->sample = array( 2000 => 1045, 1300, 1012, 1450 ); $chart->sample2 = array( 2002 => 1270, 1170, 1610, 1370 ); + $chart->render(); } catch ( Exception $e ) { @@ -99,6 +101,34 @@ class ezcGraphLabeledAxisTest extends ezcTestCase ); } + public function testAutomaticLabelingMultipleMixed() + { + try + { + $chart = ezcGraph::create( 'Line' ); + $chart->sample = array( 2000 => 1045, 2001 => 1300, 2004 => 1012, 2006 => 1450 ); + $chart->sample2 = array( 2001 => 1270, 1170, 1610, 1370, 1559 ); + $chart->render(); + } + catch ( Exception $e ) + { + $this->fail( $e->getMessage() ); + } + + $this->assertSame( + array( + '2000', + '2001', + '2002', + '2003', + '2004', + '2005', + '2006', + ), + $this->getNonPublicProperty( $chart->X_axis, 'labels' ) + ); + } + public function testRender() { $this->fail( '@TODO: Implement renderer tests.' ); |