aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2011-05-20 06:58:28 +0200
committerChristian Weiske <cweiske@cweiske.de>2011-05-20 06:58:28 +0200
commit675aa6291a39c0bc77636cca3453b7874e97b6c3 (patch)
tree936874fa4e3a5567708c44b5dbb8d3f5e6165fce /tests
parentb436b4273dfec8f376d15a0f934d5a4c153fc4d0 (diff)
downloadsemanticscuttle-675aa6291a39c0bc77636cca3453b7874e97b6c3.tar.gz
semanticscuttle-675aa6291a39c0bc77636cca3453b7874e97b6c3.tar.bz2
automatically append unittestmode parameter to url
Diffstat (limited to 'tests')
-rw-r--r--tests/TestBaseApi.php12
1 files 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;
}