summaryrefslogtreecommitdiffstats
path: root/tests/numeric_axis_test.php
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2006-06-13 17:30:30 +0000
committerKore Nordmann <github@kore-nordmann.de>2006-06-13 17:30:30 +0000
commit8e7294f3023f6b3836bbebb89d5c2845ab667354 (patch)
treebf152d5c023c55f0fbe5bce79211b20dc9022102 /tests/numeric_axis_test.php
parent1dd98606db7d94b1cfb09a1711848b4d2945bb2a (diff)
downloadzetacomponents-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.php30
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; '
+ );
+ }
}
?>
OpenPOWER on IntegriCloud