diff options
Diffstat (limited to 'modules/simpletest/drupal_web_test_case.php')
-rw-r--r-- | modules/simpletest/drupal_web_test_case.php | 6 |
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)); } /** |