diff --git a/modules/gallery_unit_test/helpers/diff.php b/modules/gallery_unit_test/helpers/diff.php deleted file mode 100644 index 7b573732..00000000 --- a/modules/gallery_unit_test/helpers/diff.php +++ /dev/null @@ -1,26 +0,0 @@ -save()->reload(); } + + static function diff($a, $b) { + fwrite(fopen($a_name = tempnam("/tmp", "test"), "w"), $a); + fwrite(fopen($b_name = tempnam("/tmp", "test"), "w"), $b); + return `diff $a_name $b_name`; + } } diff --git a/modules/gallery_unit_test/libraries/Gallery_Unit_Test_Case.php b/modules/gallery_unit_test/libraries/Gallery_Unit_Test_Case.php index 509b4125..545af0fe 100644 --- a/modules/gallery_unit_test/libraries/Gallery_Unit_Test_Case.php +++ b/modules/gallery_unit_test/libraries/Gallery_Unit_Test_Case.php @@ -24,7 +24,7 @@ class Gallery_Unit_Test_Case extends Unit_Test_Case { sprintf("Expected (%s) %s but received (%s) %s\n Diff: %s", gettype($expected), var_export($expected, true), gettype($actual), var_export($actual, true), - diff::compare(var_export($expected, true), var_export($actual, true))), + test::diff(var_export($expected, true), var_export($actual, true))), $debug); } return $this;