diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2006-06-13 17:30:30 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2006-06-13 17:30:30 +0000 |
commit | 8e7294f3023f6b3836bbebb89d5c2845ab667354 (patch) | |
tree | bf152d5c023c55f0fbe5bce79211b20dc9022102 /tests/numeric_axis_test.php | |
parent | 1dd98606db7d94b1cfb09a1711848b4d2945bb2a (diff) | |
download | zetacomponents-graph-8e7294f3023f6b3836bbebb89d5c2845ab667354.zip zetacomponents-graph-8e7294f3023f6b3836bbebb89d5c2845ab667354.tar.gz |
- Added test and implementation for exclusive zero values
Diffstat (limited to 'tests/numeric_axis_test.php')
-rw-r--r-- | tests/numeric_axis_test.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/numeric_axis_test.php b/tests/numeric_axis_test.php index fd39544..cb67f9f 100644 --- a/tests/numeric_axis_test.php +++ b/tests/numeric_axis_test.php @@ -906,6 +906,36 @@ class ezcGraphNumericAxisTest extends ezcTestCase 'As value for: minorStep; ' ); } + + public function testValueAllZero() { + $chart = ezcGraph::create( 'Line' ); + $chart->sample = array( 2000 => 0, 0 ); + $chart->render( 500, 200 ); + + $this->assertEquals( + 0., + $chart->Y_axis->min, + 'As value for: min; ' + ); + + $this->assertEquals( + 1., + $chart->Y_axis->max, + 'As value for: max; ' + ); + + $this->assertEquals( + .25, + $chart->Y_axis->majorStep, + 'As value for: majorStep; ' + ); + + $this->assertEquals( + .05, + $chart->Y_axis->minorStep, + 'As value for: minorStep; ' + ); + } } ?> |