summaryrefslogtreecommitdiff
path: root/modules/gallery_unit_test/helpers/test.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-02-09 15:52:38 -0800
committerBharat Mediratta <bharat@menalto.com>2010-02-09 15:52:38 -0800
commit8763e475adc7bb26ed9705c9d61a1db2b20e60c4 (patch)
treee5368e84f2513698eaf40e97d77936874bd1db78 /modules/gallery_unit_test/helpers/test.php
parent09d3f483234943c65cfc717cf1eb969d1d04ba73 (diff)
Move diff::compare to be test::diff
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`;
+ }
}