summaryrefslogtreecommitdiffstats
path: root/tests/driver_flash_test.php
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2006-12-15 14:28:20 +0000
committerKore Nordmann <github@kore-nordmann.de>2006-12-15 14:28:20 +0000
commitc29c23763f1a0055aac81758bb5d293534a27d09 (patch)
treea21762cdae5813fa41f2ae9c2bd4a47bc9d3515a /tests/driver_flash_test.php
parenta66577e2a622b63a0037901635850ac6abb639a4 (diff)
downloadzetacomponents-graph-c29c23763f1a0055aac81758bb5d293534a27d09.zip
zetacomponents-graph-c29c23763f1a0055aac81758bb5d293534a27d09.tar.gz
- Moced compare methods to ezcGraphTestCase
Diffstat (limited to 'tests/driver_flash_test.php')
-rw-r--r--tests/driver_flash_test.php40
1 files changed, 3 insertions, 37 deletions
diff --git a/tests/driver_flash_test.php b/tests/driver_flash_test.php
index ffeaf21..50ab236 100644
--- a/tests/driver_flash_test.php
+++ b/tests/driver_flash_test.php
@@ -9,13 +9,15 @@
* @license http://ez.no/licenses/new_bsd New BSD License
*/
+require_once dirname( __FILE__ ) . '/test_case.php';
+
/**
* Tests for ezcGraph class.
*
* @package ImageAnalysis
* @subpackage Tests
*/
-class ezcGraphFlashDriverTest extends ezcTestCase
+class ezcGraphFlashDriverTest extends ezcGraphTestCase
{
protected $driver;
@@ -61,42 +63,6 @@ class ezcGraphFlashDriverTest extends ezcTestCase
}
}
- /**
- * Compares to flash files comparing the output of `swftophp`
- *
- * @param string $generated Filename of generated image
- * @param string $compare Filename of stored image
- * @return void
- */
- protected function swfCompare( $generated, $compare )
- {
- $this->assertTrue(
- file_exists( $generated ),
- 'No image file has been created.'
- );
-
- $this->assertTrue(
- file_exists( $compare ),
- 'Comparision image does not exist.'
- );
-
- $executeable = ezcBaseFeatures::findExecutableInPath( 'swftophp' );
-
- if ( !$executeable )
- {
- $this->markTestSkipped( 'Could not find swftophp executeable to compare flash files. Please check your $PATH.' );
- }
-
- $generatedCode = shell_exec( $executeable . ' ' . escapeshellarg( $generated ) );
- $compareCode = shell_exec( $executeable . ' ' . escapeshellarg( $compare ) );
-
- $this->assertEquals(
- $generatedCode,
- $compareCode,
- 'Rendered image is not correct.'
- );
- }
-
public function testDrawLine()
{
$filename = $this->tempDir . __FUNCTION__ . '.swf';
OpenPOWER on IntegriCloud