Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@googlemail.com>2014-02-12 05:25:50 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-02-12 05:25:50 +0400
commitf39d3ccc68fb864b2586a0b9c6a20aa27be137e0 (patch)
treec4e2c571cacb6557578cd85c725d30a424ce3a2b /core/CliMulti.php
parente7b54d9a6a798c47e60de08ffad76a7f0d5c78d0 (diff)
refs #4610 fix tests
Diffstat (limited to 'core/CliMulti.php')
-rw-r--r--core/CliMulti.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/core/CliMulti.php b/core/CliMulti.php
index 270274c0b2..e88b24311e 100644
--- a/core/CliMulti.php
+++ b/core/CliMulti.php
@@ -209,6 +209,7 @@ class CliMulti {
{
$this->processes[] = new Process($cmdId);
+ $url = $this->appendTestmodeParamToUrlIfNeeded($url);
$query = Url::getQueryFromUrl($url, array('pid' => $cmdId));
$command = $this->buildCommand($query, $output->getPathToFile());
@@ -232,4 +233,17 @@ class CliMulti {
$output->write($message);
}
}
+
+ private function appendTestmodeParamToUrlIfNeeded($url)
+ {
+ $isTestMode = $url && false !== strpos($url, 'tests/PHPUnit/proxy');
+
+ if ($isTestMode && false === strpos($url, '?')) {
+ $url .= "?testmode=1";
+ } elseif ($isTestMode) {
+ $url .= "&testmode=1";
+ }
+
+ return $url;
+ }
}