From 8763e475adc7bb26ed9705c9d61a1db2b20e60c4 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 9 Feb 2010 15:52:38 -0800 Subject: Move diff::compare to be test::diff --- modules/gallery_unit_test/helpers/test.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'modules/gallery_unit_test/helpers/test.php') 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`; + } } -- cgit v1.2.3