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:
Diffstat (limited to 'tests/PHPUnit')
-rw-r--r--tests/PHPUnit/bootstrap.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/PHPUnit/bootstrap.php b/tests/PHPUnit/bootstrap.php
index 313f8f4b6a..444728bafd 100644
--- a/tests/PHPUnit/bootstrap.php
+++ b/tests/PHPUnit/bootstrap.php
@@ -44,6 +44,16 @@ if (getenv('PIWIK_USE_XHPROF') == 1) {
\Piwik\Profiler::setupProfilerXHProf();
}
+function setPiwikDomainFromEnvVar()
+{
+ $piwikDomain = getenv('PIWIK_DOMAIN');
+ if (!empty($piwikDomain)) {
+ $_SERVER['HTTP_HOST'] = $piwikDomain;
+ }
+}
+
+setPiwikDomainFromEnvVar();
+
// setup container for tests
function setupRootContainer() {
// before running tests, delete the TestingEnvironmentVariables file, since it can indirectly mess w/