automatically append unittestmode parameter to url
This commit is contained in:
parent
b436b4273d
commit
675aa6291a
1 changed files with 8 additions and 4 deletions
|
@ -77,10 +77,14 @@ class TestBaseApi extends TestBase
|
||||||
*/
|
*/
|
||||||
protected function getRequest($urlSuffix = null)
|
protected function getRequest($urlSuffix = null)
|
||||||
{
|
{
|
||||||
$req = new HTTP_Request2(
|
$url = $this->url . $urlSuffix;
|
||||||
$this->url . $urlSuffix,
|
if (strpos($urlSuffix, '?') !== false) {
|
||||||
HTTP_Request2::METHOD_GET
|
$url .= '&unittestMode=1';
|
||||||
);
|
} else {
|
||||||
|
$url .= '?unittestMode=1';
|
||||||
|
}
|
||||||
|
|
||||||
|
$req = new HTTP_Request2($url, HTTP_Request2::METHOD_GET);
|
||||||
|
|
||||||
return $req;
|
return $req;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue