summaryrefslogtreecommitdiffstats
path: root/application/test/Test.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/test/Test.php')
-rw-r--r--application/test/Test.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/application/test/Test.php b/application/test/Test.php
index 33278436b..b8052fbba 100644
--- a/application/test/Test.php
+++ b/application/test/Test.php
@@ -90,10 +90,14 @@ abstract class Test {
// Method: POST, PUT, GET etc
// Data: array("param" => "value") ==> index.php?param=value
// Source: http://stackoverflow.com/a/9802854/953022
- protected function CallAPI($method, $url, $data = false)
+ protected function CallAPI($method, $url, $data = false, $return_json = false)
{
$result = $this->SendHTTPRequest($method, $url, $data);
+ if ($return_json) {
+ return $result;
+ }
+
$json = json_decode($result, true);
if ($json === NULL) {
$this->t->fail("json decode");