diff --git a/tests/PHPUnit/Framework/Fixture.php b/tests/PHPUnit/Framework/Fixture.php index 2696888bcb2654e6744ff1076d1fb8a44d57c998..c8cb6d67837a03a4629684fdcca764ffc9a13824 100644 --- a/tests/PHPUnit/Framework/Fixture.php +++ b/tests/PHPUnit/Framework/Fixture.php @@ -462,6 +462,7 @@ class Fixture extends \PHPUnit_Framework_Assert public static function getRootUrl() { $piwikUrl = Config::getInstance()->tests['http_host']; + $piwikUri = Config::getInstance()->tests['request_uri']; if (strpos($piwikUrl, 'http://') !== 0) { $piwikUrl = 'http://' . $piwikUrl . '/'; @@ -482,6 +483,9 @@ class Fixture extends \PHPUnit_Framework_Assert // we don't want to require Travis CI or devs to setup HTTPS on their local machine $piwikUrl = str_replace("https://", "http://", $piwikUrl); + // append REQUEST_URI (eg. when Piwik runs at http://localhost/piwik/) + $piwikUrl .= $piwikUri; + return $piwikUrl; }