summaryrefslogtreecommitdiff
path: root/modules/simpletest/drupal_web_test_case.php
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-11-21 00:43:42 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-11-21 00:43:42 +0000
commit59ceca0caf52002cf44206feec7c7213bc079939 (patch)
tree795bbe8ed9a00e4d55ce47516d5c6b4aa589c5e0 /modules/simpletest/drupal_web_test_case.php
parent34119ba98b9e7b412ed7efdcf7b9e9b704f790c7 (diff)
downloadbrdo-59ceca0caf52002cf44206feec7c7213bc079939.tar.gz
brdo-59ceca0caf52002cf44206feec7c7213bc079939.tar.bz2
#633156 follow-up by effulgentsia and yched: Clean up AJAX tests, add sister function to drupal_js_encode().
Diffstat (limited to 'modules/simpletest/drupal_web_test_case.php')
-rw-r--r--modules/simpletest/drupal_web_test_case.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php
index c1642e5b6..998716926 100644
--- a/modules/simpletest/drupal_web_test_case.php
+++ b/modules/simpletest/drupal_web_test_case.php
@@ -1404,8 +1404,7 @@ class DrupalWebTestCase extends DrupalTestCase {
* Retrieve a Drupal path or an absolute path and JSON decode the result.
*/
function drupalGetAJAX($path, array $options = array(), array $headers = array()) {
- $out = $this->drupalGet($path, $options, $headers);
- return json_decode($out, TRUE);
+ return drupal_json_decode($this->drupalGet($path, $options, $headers));
}
/**
@@ -1545,8 +1544,7 @@ class DrupalWebTestCase extends DrupalTestCase {
* Execute a POST request on an AJAX path and JSON decode the result.
*/
protected function drupalPostAJAX($path, $edit, $triggering_element, $ajax_path = 'system/ajax', array $options = array(), array $headers = array()) {
- $out = $this->drupalPost($path, $edit, array('path' => $ajax_path, 'triggering_element' => $triggering_element), $options, $headers);
- return json_decode($out, TRUE);
+ return drupal_json_decode($this->drupalPost($path, $edit, array('path' => $ajax_path, 'triggering_element' => $triggering_element), $options, $headers));
}
/**