summaryrefslogtreecommitdiffstats
path: root/tests/driver_flash_test.php
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2007-12-18 20:22:21 +0000
committerKore Nordmann <github@kore-nordmann.de>2007-12-18 20:22:21 +0000
commit8b13fd34117e878f0ebbbe9969dbe89c9640b2c7 (patch)
tree4837c314e21f6e56016cf7bf04e09d53f49c1685 /tests/driver_flash_test.php
parenta90ca23ccd7f2ed57b2dde9d5a361d34fdab01a1 (diff)
downloadzetacomponents-graph-8b13fd34117e878f0ebbbe9969dbe89c9640b2c7.zip
zetacomponents-graph-8b13fd34117e878f0ebbbe9969dbe89c9640b2c7.tar.gz
- Fixed support for bitmaps in flash driver
# - Removed exception, because scaling bimaps is possible, and we do not # need to throw an exception in this case. # - Fixed test cases, because PNGs are supported, even the documentation # says otherwise
Diffstat (limited to 'tests/driver_flash_test.php')
-rw-r--r--tests/driver_flash_test.php51
1 files changed, 13 insertions, 38 deletions
diff --git a/tests/driver_flash_test.php b/tests/driver_flash_test.php
index 7c7e3e7..12cb817 100644
--- a/tests/driver_flash_test.php
+++ b/tests/driver_flash_test.php
@@ -506,27 +506,6 @@ class ezcGraphFlashDriverTest extends ezcGraphTestCase
);
}
- public function testDrawImageOutOfBoundings()
- {
- $filename = $this->tempDir . __FUNCTION__ . '.swf';
-
- try
- {
- $return = $this->driver->drawImage(
- $this->basePath . $this->testFiles['jpeg'],
- new ezcGraphCoordinate( 10, 10 ),
- 100,
- 50
- );
- }
- catch ( ezcGraphFlashBitmapBoundingsException $e )
- {
- return true;
- }
-
- $this->fail( 'Expected ezcGraphFlashBitmapBoundingsException.' );
- }
-
public function testDrawImageGif()
{
$filename = $this->tempDir . __FUNCTION__ . '.swf';
@@ -552,31 +531,27 @@ class ezcGraphFlashDriverTest extends ezcGraphTestCase
{
$filename = $this->tempDir . __FUNCTION__ . '.swf';
- try
- {
- $return = $this->driver->drawImage(
- $this->basePath . $this->testFiles['png'],
- new ezcGraphCoordinate( 10, 10 ),
- 177,
- 100
- );
- }
- catch ( ezcGraphFlashBitmapTypeException $e )
- {
- return true;
- }
+ $return = $this->driver->drawImage(
+ $this->basePath . $this->testFiles['png'],
+ new ezcGraphCoordinate( 10, 10 ),
+ 177,
+ 100
+ );
- $this->fail( 'Expected ezcGraphFlashBitmapBoundingsException.' );
+ $this->driver->render( $filename );
+
+ $this->swfCompare(
+ $filename,
+ $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.swf'
+ );
}
public function testDrawImageJpeg()
{
- $this->fail( 'Ends up in a recursive loop somehow caused by PHPUnits error handling and exception conversion.' );
-
$filename = $this->tempDir . __FUNCTION__ . '.swf';
$this->driver->drawImage(
- $this->basePath . $this->testFiles['non_interlaced'],
+ $this->basePath . $this->testFiles['jpeg'],
new ezcGraphCoordinate( 10, 10 ),
177,
100
OpenPOWER on IntegriCloud