diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-02-09 15:52:38 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-02-09 15:52:38 -0800 |
commit | 8763e475adc7bb26ed9705c9d61a1db2b20e60c4 (patch) | |
tree | e5368e84f2513698eaf40e97d77936874bd1db78 /modules/gallery_unit_test/helpers/test.php | |
parent | 09d3f483234943c65cfc717cf1eb969d1d04ba73 (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.php | 6 |
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`; + } } |