summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2006-12-15 14:45:36 +0000
committerKore Nordmann <github@kore-nordmann.de>2006-12-15 14:45:36 +0000
commite2e9617e9584319ffba712db7bf4de7c3f7c430b (patch)
tree4ce9564c9554c218536b7b6897cdcd33255cbe3a
parentc29c23763f1a0055aac81758bb5d293534a27d09 (diff)
downloadzetacomponents-graph-e2e9617e9584319ffba712db7bf4de7c3f7c430b.zip
zetacomponents-graph-e2e9617e9584319ffba712db7bf4de7c3f7c430b.tar.gz
- Normalize generated PHP code from `swftophp` to make test order irrelevant
-rw-r--r--tests/test_case.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_case.php b/tests/test_case.php
index 2c0568a..d2289fd 100644
--- a/tests/test_case.php
+++ b/tests/test_case.php
@@ -34,6 +34,18 @@ class ezcGraphTestCase extends ezcImageTestCase
$generatedCode = shell_exec( $executeable . ' ' . escapeshellarg( $generated ) );
$compareCode = shell_exec( $executeable . ' ' . escapeshellarg( $compare ) );
+ foreach (
+ array(
+ 'generatedCode' => $generatedCode,
+ 'compareCode' => $compareCode,
+ ) as $var => $content )
+ {
+ $content = preg_replace( '/\$[sf]\d+/', '$var', $content );
+ $content = preg_replace( '[/\\*.*\\*/]i', '/* Comment irrelevant */', $content );
+
+ $$var = $content;
+ }
+
$this->assertEquals(
$generatedCode,
$compareCode,
OpenPOWER on IntegriCloud