Author: Kore Nordmann
Date: 2006-06-19 16:55:05 +0200 (Mon, 19 Jun 2006)
New Revision: 3145
Log:
- Added tests for setting axis types with new axis names
Modified:
trunk/Graph/tests/labeled_axis_test.php
trunk/Graph/tests/numeric_axis_test.php
Modified: trunk/Graph/tests/labeled_axis_test.php
===================================================================
--- trunk/Graph/tests/labeled_axis_test.php 2006-06-19 14:48:30 UTC (rev
3144)
+++ trunk/Graph/tests/labeled_axis_test.php 2006-06-19 14:55:05 UTC (rev
3145)
@@ -552,6 +552,23 @@
$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.'
+ );
+ }
}
?>
Modified: trunk/Graph/tests/numeric_axis_test.php
===================================================================
--- trunk/Graph/tests/numeric_axis_test.php 2006-06-19 14:48:30 UTC (rev
3144)
+++ trunk/Graph/tests/numeric_axis_test.php 2006-06-19 14:55:05 UTC (rev
3145)
@@ -825,7 +825,7 @@
}
$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 @@
$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 @@
);
}
- public function testValueAllZero() {
+ public function testValueAllZero()
+ {
$chart = ezcGraph::create( 'Line' );
$chart->sample = array( 2000 => 0, 0 );
$chart->render( 500, 200 );
@@ -936,6 +938,23 @@
'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.'
+ );
+ }
}
?>
--
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components