summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2007-09-04 08:40:38 +0000
committerKore Nordmann <github@kore-nordmann.de>2007-09-04 08:40:38 +0000
commit6e5582742fb0e67b71e94e0a9bedc91723c3ef3e (patch)
treef92294f019b425888e765c0258c08e6a367271cd /tests
parentc61ea3b2139f5b388ebc8b99b891b0b7ea41524d (diff)
downloadzetacomponents-graph-6e5582742fb0e67b71e94e0a9bedc91723c3ef3e.zip
zetacomponents-graph-6e5582742fb0e67b71e94e0a9bedc91723c3ef3e.tar.gz
- Also test iterator
Diffstat (limited to 'tests')
-rw-r--r--tests/multiple_axis_test.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/multiple_axis_test.php b/tests/multiple_axis_test.php
index 1889667..f3878a0 100644
--- a/tests/multiple_axis_test.php
+++ b/tests/multiple_axis_test.php
@@ -68,6 +68,31 @@ class ezcGraphMultipleAxisTest extends ezcTestCase
$this->fail( 'Expected ezcBaseValueException.' );
}
+ public function testAxisContainerIterator()
+ {
+ $options = new ezcGraphLineChartOptions();
+
+ $axis = array();
+
+ $options->additionalAxis[] = $axis[] = new ezcGraphChartElementNumericAxis();
+ $options->additionalAxis[] = $axis[] = new ezcGraphChartElementNumericAxis();
+ $options->additionalAxis['foo'] = $axis['foo'] = new ezcGraphChartElementLabeledAxis();
+
+ foreach ( $options->additionalAxis as $key => $value )
+ {
+ $this->assertTrue(
+ array_key_exists( $key, $axis ),
+ "Expecteded key '$key' in both arrays."
+ );
+
+ $this->assertSame(
+ $axis[$key],
+ $value,
+ "Value should be the same for key '$key'."
+ );
+ }
+ }
+
public function testAddAdditionalAxisToChart()
{
$chart = new ezcGraphLineChart();
OpenPOWER on IntegriCloud