From 675aa6291a39c0bc77636cca3453b7874e97b6c3 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Fri, 20 May 2011 06:58:28 +0200 Subject: [PATCH] automatically append unittestmode parameter to url --- tests/TestBaseApi.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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; }