diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2006-10-27 10:27:14 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2006-10-27 10:27:14 +0000 |
commit | 4ed2de1f6271653a6f965237a245d0d4c2535aab (patch) | |
tree | f5add06d6b7d81e687e978f334d01e4ebc9f0ad3 /tests/element_options_test.php | |
parent | 1658235bc062aed25270711694430deba7c31c77 (diff) | |
download | zetacomponents-graph-4ed2de1f6271653a6f965237a245d0d4c2535aab.zip zetacomponents-graph-4ed2de1f6271653a6f965237a245d0d4c2535aab.tar.gz |
- Added more tests and fixed some minor setter and getter bugs
Diffstat (limited to 'tests/element_options_test.php')
-rw-r--r-- | tests/element_options_test.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/element_options_test.php b/tests/element_options_test.php index 60c1b25..c7014a6 100644 --- a/tests/element_options_test.php +++ b/tests/element_options_test.php @@ -681,6 +681,35 @@ class ezcGraphElementOptionsTest extends ezcImageTestCase ); } + public function testChartElementAxisPropertyAxisLabelRenderer() + { + $options = new ezcGraphChartElementNumericAxis(); + + $this->assertSame( + 'ezcGraphAxisExactLabelRenderer', + get_class( $options->axisLabelRenderer ), + 'Wrong default value for property axisLabelRenderer in class ezcGraphChartElementNumericAxis' + ); + + $options->axisLabelRenderer = $axisLabelRenderer = new ezcGraphAxisBoxedLabelRenderer(); + $this->assertSame( + $axisLabelRenderer, + $options->axisLabelRenderer, + 'Setting property value did not work for property axisLabelRenderer in class ezcGraphChartElementNumericAxis' + ); + + try + { + $options->axisLabelRenderer = false; + } + catch( ezcBaseValueException $e ) + { + return true; + } + + $this->fail( 'Expected ezcBaseValueException.' ); + } + public function testChartElementTextPropertyMaxHeight() { $options = new ezcGraphChartElementText(); |