summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/labeled_axis_test.php17
-rw-r--r--tests/numeric_axis_test.php25
2 files changed, 39 insertions, 3 deletions
diff --git a/tests/labeled_axis_test.php b/tests/labeled_axis_test.php
index dd27c3b..a31e1c7 100644
--- a/tests/labeled_axis_test.php
+++ b/tests/labeled_axis_test.php
@@ -552,6 +552,23 @@ class ezcGraphLabeledAxisTest extends ezcTestCase
$chart->render( 500, 200 );
}
+
+ public function testSetNumericAxis()
+ {
+ $chart = ezcGraph::create( 'line' );
+ $chart->xAxis = new ezcGraphChartElementLabeledAxis();
+ $chart->yAxis = new ezcGraphChartElementLabeledAxis();
+
+ $this->assertTrue(
+ $chart->xAxis instanceof ezcGraphChartElementLabeledAxis,
+ 'X axis should be labeled.'
+ );
+
+ $this->assertTrue(
+ $chart->yAxis instanceof ezcGraphChartElementLabeledAxis,
+ 'Y axis should be labeled.'
+ );
+ }
}
?>
diff --git a/tests/numeric_axis_test.php b/tests/numeric_axis_test.php
index a760875..f6cc687 100644
--- a/tests/numeric_axis_test.php
+++ b/tests/numeric_axis_test.php
@@ -825,7 +825,7 @@ class ezcGraphNumericAxisTest extends ezcTestCase
}
$chart = ezcGraph::create( 'Line' );
- $chart->X_Axis = new ezcGraphChartElementNumericAxis();
+ $chart->xAxis = new ezcGraphChartElementNumericAxis();
$chart->sinus = $sin;
$mockedRenderer = $this->getMock( 'ezcGraphRenderer2D', array(
@@ -877,7 +877,8 @@ class ezcGraphNumericAxisTest extends ezcTestCase
$chart->render( 500, 200 );
}
- public function testValueZeroAmplitude() {
+ public function testValueZeroAmplitude()
+ {
$chart = ezcGraph::create( 'Line' );
$chart->sample = array( 2000 => 70, 70, 70, 70 );
$chart->render( 500, 200 );
@@ -907,7 +908,8 @@ class ezcGraphNumericAxisTest extends ezcTestCase
);
}
- public function testValueAllZero() {
+ public function testValueAllZero()
+ {
$chart = ezcGraph::create( 'Line' );
$chart->sample = array( 2000 => 0, 0 );
$chart->render( 500, 200 );
@@ -936,6 +938,23 @@ class ezcGraphNumericAxisTest extends ezcTestCase
'As value for: minorStep; '
);
}
+
+ public function testSetNumericAxis()
+ {
+ $chart = ezcGraph::create( 'line' );
+ $chart->xAxis = new ezcGraphChartElementNumericAxis();
+ $chart->yAxis = new ezcGraphChartElementNumericAxis();
+
+ $this->assertTrue(
+ $chart->xAxis instanceof ezcGraphChartElementNumericAxis,
+ 'X axis should be numeric.'
+ );
+
+ $this->assertTrue(
+ $chart->yAxis instanceof ezcGraphChartElementNumericAxis,
+ 'Y axis should be numeric.'
+ );
+ }
}
?>
OpenPOWER on IntegriCloud