summaryrefslogtreecommitdiff
path: root/modules/gallery_unit_test/helpers/test.php
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2010-02-10 08:07:20 -0800
committerTim Almdal <tnalmdal@shaw.ca>2010-02-10 08:07:20 -0800
commitb42c736607591f8e2bed4aea474ad622b3f7445a (patch)
tree83be1069a48cf604a0f73c5d895248c724024fc7 /modules/gallery_unit_test/helpers/test.php
parent5e703186fbf0c0cb689fc737de7c074249361ef9 (diff)
parent8763e475adc7bb26ed9705c9d61a1db2b20e60c4 (diff)
Merge branch 'master' into talmdal_dev
Conflicts: modules/organize/js/organize.js
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`;
+ }
}