summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-01-20 00:06:36 -0800
committerBharat Mediratta <bharat@menalto.com>2010-01-20 00:06:36 -0800
commit66fbbab9071e73df01b316bb29842fdc3b29c39c (patch)
tree23c77693bc9beba08578459dbdf3285d069e89f1 /modules
parentb09450cf5d864338b5fbc246fd722f841b32e254 (diff)
Add assert_array_equal_to_json().
Diffstat (limited to 'modules')
-rw-r--r--modules/gallery_unit_test/libraries/Gallery_Unit_Test_Case.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/gallery_unit_test/libraries/Gallery_Unit_Test_Case.php b/modules/gallery_unit_test/libraries/Gallery_Unit_Test_Case.php
index 81bd3330..509b4125 100644
--- a/modules/gallery_unit_test/libraries/Gallery_Unit_Test_Case.php
+++ b/modules/gallery_unit_test/libraries/Gallery_Unit_Test_Case.php
@@ -29,4 +29,8 @@ class Gallery_Unit_Test_Case extends Unit_Test_Case {
}
return $this;
}
+
+ public function assert_array_equal_to_json($expected_array, $actual_json, $debug=null) {
+ return $this->assert_equal_array($expected_array, json_decode($actual_json, true), $debug);
+ }
}