From f01b8b1bdfb55dd7e77c8b9eec8def3989a6560c Mon Sep 17 00:00:00 2001 From: Kore Nordmann Date: Thu, 10 May 2007 07:20:12 +0000 Subject: - Fixed element option tests to test the right property # Blame copy & paste --- tests/element_options_test.php | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) (limited to 'tests/element_options_test.php') diff --git a/tests/element_options_test.php b/tests/element_options_test.php index 81332a6..6687714 100644 --- a/tests/element_options_test.php +++ b/tests/element_options_test.php @@ -415,6 +415,35 @@ class ezcGraphElementOptionsTest extends ezcTestImageCase $this->fail( 'Expected ezcBaseValueException.' ); } + public function testChartElementLegendPropertyPadding() + { + $options = new ezcGraphChartElementLegend(); + + $this->assertSame( + 0, + $options->padding, + 'Wrong default value for property padding in class ezcGraphChartElementLegend' + ); + + $options->padding = 1; + $this->assertSame( + 1, + $options->padding, + 'Setting property value did not work for property padding in class ezcGraphChartElementLegend' + ); + + try + { + $options->padding = false; + } + catch ( ezcBaseValueException $e ) + { + return true; + } + + $this->fail( 'Expected ezcBaseValueException.' ); + } + public function testChartElementLegendPropertyPortraitSize() { $options = new ezcGraphChartElementLegend(); @@ -492,7 +521,7 @@ class ezcGraphElementOptionsTest extends ezcTestImageCase try { - $options->landscapeSize = false; + $options->symbolSize = false; } catch ( ezcBaseValueException $e ) { @@ -521,7 +550,7 @@ class ezcGraphElementOptionsTest extends ezcTestImageCase try { - $options->landscapeSize = 42; + $options->minimumSymbolSize = 42; } catch ( ezcBaseValueException $e ) { @@ -550,7 +579,7 @@ class ezcGraphElementOptionsTest extends ezcTestImageCase try { - $options->landscapeSize = false; + $options->spacing = false; } catch ( ezcBaseValueException $e ) { -- cgit v1.1