From: Christian Weiske Date: Fri, 20 May 2011 04:58:28 +0000 (+0200) Subject: automatically append unittestmode parameter to url X-Git-Tag: v0.98.0~37^2~3 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=675aa6291a39c0bc77636cca3453b7874e97b6c3;p=semanticscuttle.git automatically append unittestmode parameter to url --- diff --git a/tests/TestBaseApi.php b/tests/TestBaseApi.php index 31797c9..1f2e8ff 100644 --- a/tests/TestBaseApi.php +++ b/tests/TestBaseApi.php @@ -77,10 +77,14 @@ class TestBaseApi extends TestBase */ protected function getRequest($urlSuffix = null) { - $req = new HTTP_Request2( - $this->url . $urlSuffix, - HTTP_Request2::METHOD_GET - ); + $url = $this->url . $urlSuffix; + if (strpos($urlSuffix, '?') !== false) { + $url .= '&unittestMode=1'; + } else { + $url .= '?unittestMode=1'; + } + + $req = new HTTP_Request2($url, HTTP_Request2::METHOD_GET); return $req; }