summaryrefslogtreecommitdiff
path: root/modules/gallery_unit_test/helpers/test.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery_unit_test/helpers/test.php')
-rw-r--r--modules/gallery_unit_test/helpers/test.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/gallery_unit_test/helpers/test.php b/modules/gallery_unit_test/helpers/test.php
index 3e116808..91bd1be5 100644
--- a/modules/gallery_unit_test/helpers/test.php
+++ b/modules/gallery_unit_test/helpers/test.php
@@ -82,4 +82,10 @@ class test_Core {
// Reload so that ORM coerces all fields into strings.
return $tag->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`;
+ }
}