diff options
Diffstat (limited to 'tests/PHPUnit/Framework/Fixture.php')
-rw-r--r-- | tests/PHPUnit/Framework/Fixture.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/PHPUnit/Framework/Fixture.php b/tests/PHPUnit/Framework/Fixture.php index 88b057f4e1..1150444db3 100644 --- a/tests/PHPUnit/Framework/Fixture.php +++ b/tests/PHPUnit/Framework/Fixture.php @@ -15,6 +15,7 @@ use Piwik\Auth; use Piwik\Auth\Password; use Matomo\Cache\Backend\File; use Piwik\Cache as PiwikCache; +use Piwik\CliMulti\CliPhp; use Piwik\Common; use Piwik\Config; use Piwik\Container\StaticContainer; @@ -145,6 +146,20 @@ class Fixture extends \PHPUnit_Framework_Assert return 'python'; } + public static function getCliCommandBase() + { + $cliPhp = new CliPhp(); + $php = $cliPhp->findPhpBinary(); + + $command = $php . ' ' . PIWIK_INCLUDE_PATH .'/tests/PHPUnit/proxy/console '; + + if (!empty($_SERVER['HTTP_HOST'])) { + $command .= '--matomo-domain=' . $_SERVER['HTTP_HOST']; + } + + return $command; + } + public static function getTestRootUrl() { return self::getRootUrl() . 'tests/PHPUnit/proxy/'; |