summaryrefslogtreecommitdiffstats
path: root/tests/driver_flash_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_flash_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_flash_test.php')
-rw-r--r--tests/driver_flash_test.php28
1 files changed, 24 insertions, 4 deletions
diff --git a/tests/driver_flash_test.php b/tests/driver_flash_test.php
index 409475f..d9b4287 100644
--- a/tests/driver_flash_test.php
+++ b/tests/driver_flash_test.php
@@ -1274,15 +1274,15 @@ class ezcGraphFlashDriverTest extends ezcGraphTestCase
public function testDrawTooLongTextException()
{
- $filename = $this->tempDir . __FUNCTION__ . '.png';
+ $filename = $this->tempDir . __FUNCTION__ . '.swf';
try
{
$this->driver->drawTextBox(
- 'This is very long text which is not supposed to fit in the bounding box.',
+ 'Teststring foo',
new ezcGraphCoordinate( 10, 10 ),
- 50,
- 20,
+ 1,
+ 6,
ezcGraph::LEFT
);
@@ -1296,6 +1296,26 @@ class ezcGraphFlashDriverTest extends ezcGraphTestCase
$this->fail( 'Expected ezcGraphFontRenderingException.' );
}
+ public function testShortenStringMoreChars()
+ {
+ $filename = $this->tempDir . __FUNCTION__ . '.swf';
+
+ $this->driver->drawTextBox(
+ 'Teststring foo',
+ new ezcGraphCoordinate( 10, 10 ),
+ 24,
+ 6,
+ ezcGraph::LEFT
+ );
+
+ $this->driver->render( $filename );
+
+ $this->swfCompare(
+ $filename,
+ $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.swf'
+ );
+ }
+
public function testDrawCircleRadialFill()
{
$filename = $this->tempDir . __FUNCTION__ . '.swf';
OpenPOWER on IntegriCloud