summaryrefslogtreecommitdiffstats
path: root/tests/test_case.php
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2007-07-03 10:51:55 +0000
committerKore Nordmann <github@kore-nordmann.de>2007-07-03 10:51:55 +0000
commit27c2bc59c7ec3c88f435e9d267e3b9f4318bd856 (patch)
tree29447561a7b390dee29ce7ba2f927284674e6e37 /tests/test_case.php
parent31fd34c1c1f5d03c9eddac0683c45df8c06db6e0 (diff)
downloadzetacomponents-graph-27c2bc59c7ec3c88f435e9d267e3b9f4318bd856.zip
zetacomponents-graph-27c2bc59c7ec3c88f435e9d267e3b9f4318bd856.tar.gz
- Use PHPUnits XML diffing to compare SVG files
# Only works with PHPUnit >= 3.1.2 or PHPUnit 3.1.1 including changesets # #733 and #737
Diffstat (limited to 'tests/test_case.php')
-rw-r--r--tests/test_case.php18
1 files changed, 3 insertions, 15 deletions
diff --git a/tests/test_case.php b/tests/test_case.php
index 0ed30b2..cfdad4d 100644
--- a/tests/test_case.php
+++ b/tests/test_case.php
@@ -59,22 +59,10 @@ class ezcGraphTestCase extends ezcTestImageCase
*/
protected function compare( $generated, $compare )
{
- $this->assertTrue(
- file_exists( $generated ),
- 'No image file has been created.'
+ $this->assertXmlFileEqualsXmlFile(
+ $generated,
+ $compare
);
-
- $this->assertTrue(
- file_exists( $compare ),
- 'Comparision image does not exist.'
- );
-
- if ( md5_file( $generated ) !== md5_file( $compare ) )
- {
- // Adding a diff makes no sense here, because created XML uses
- // only two lines
- $this->fail( 'Rendered image is not correct.');
- }
}
}
OpenPOWER on IntegriCloud