automatically append unittestmode parameter to url

This commit is contained in:
Christian Weiske 2011-05-20 06:58:28 +02:00
parent b436b4273d
commit 675aa6291a

View file

@ -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;
}