summaryrefslogtreecommitdiffstats
path: root/tests/driver_options_test.php
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2007-05-29 07:31:41 +0000
committerKore Nordmann <github@kore-nordmann.de>2007-05-29 07:31:41 +0000
commite9f7f66fef8d66865eae4cf731bf502c19dc948e (patch)
tree90b2ae3b143e4e3139c71f42c5cdee9a2779331b /tests/driver_options_test.php
parentcc7669f009a394d3ac90f8aef489438fbccd3e9c (diff)
downloadzetacomponents-graph-e9f7f66fef8d66865eae4cf731bf502c19dc948e.zip
zetacomponents-graph-e9f7f66fef8d66865eae4cf731bf502c19dc948e.tar.gz
- Fixed issue #10830: Automatically shorten labels if not enough space is
available
Diffstat (limited to 'tests/driver_options_test.php')
-rw-r--r--tests/driver_options_test.php47
1 files changed, 47 insertions, 0 deletions
diff --git a/tests/driver_options_test.php b/tests/driver_options_test.php
index 705ade6..e544648 100644
--- a/tests/driver_options_test.php
+++ b/tests/driver_options_test.php
@@ -171,6 +171,53 @@ class ezcGraphDriverOptionsTest extends ezcTestImageCase
$this->fail( 'Expected ezcBaseValueException.' );
}
+ public function testDriverOptionsPropertyAutoShortenString()
+ {
+ $options = new ezcGraphSvgDriverOptions();
+
+ $this->assertSame(
+ true,
+ $options->autoShortenString,
+ 'Wrong default value for property autoShortenString in class ezcGraphDriverOptions'
+ );
+
+ $options->autoShortenString = false;
+ $this->assertSame(
+ false,
+ $options->autoShortenString,
+ 'Setting property value did not work for property autoShortenString in class ezcGraphDriverOptions'
+ );
+
+ try
+ {
+ $options->autoShortenString = 42;
+ }
+ catch ( ezcBaseValueException $e )
+ {
+ return true;
+ }
+
+ $this->fail( 'Expected ezcBaseValueException.' );
+ }
+
+ public function testDriverOptionsPropertyAutoShortenStringPostFix()
+ {
+ $options = new ezcGraphSvgDriverOptions();
+
+ $this->assertSame(
+ '..',
+ $options->autoShortenStringPostFix,
+ 'Wrong default value for property autoShortenStringPostFix in class ezcGraphDriverOptions'
+ );
+
+ $options->autoShortenStringPostFix = ' ...';
+ $this->assertSame(
+ ' ...',
+ $options->autoShortenStringPostFix,
+ 'Setting property value did not work for property autoShortenStringPostFix in class ezcGraphDriverOptions'
+ );
+ }
+
public function testPropertyNotFoundException()
{
$options = new ezcGraphSvgDriverOptions();
OpenPOWER on IntegriCloud