summaryrefslogtreecommitdiffstats
path: root/tests/element_options_test.php
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2007-05-10 07:20:12 +0000
committerKore Nordmann <github@kore-nordmann.de>2007-05-10 07:20:12 +0000
commitf01b8b1bdfb55dd7e77c8b9eec8def3989a6560c (patch)
tree15c30d4ff7dbd2ce210d0a292e50d8c2f4089a3e /tests/element_options_test.php
parente7c4e0a2f06c711ed70923ef62f8c417f442766b (diff)
downloadzetacomponents-graph-f01b8b1bdfb55dd7e77c8b9eec8def3989a6560c.zip
zetacomponents-graph-f01b8b1bdfb55dd7e77c8b9eec8def3989a6560c.tar.gz
- Fixed element option tests to test the right property
# Blame copy & paste
Diffstat (limited to 'tests/element_options_test.php')
-rw-r--r--tests/element_options_test.php35
1 files changed, 32 insertions, 3 deletions
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 )
{
OpenPOWER on IntegriCloud