diff options
Diffstat (limited to 'tests/PHPUnit/bootstrap.php')
-rw-r--r-- | tests/PHPUnit/bootstrap.php | 10 |
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/ |