Newer
Older
Benaka Moorthi
a validé
* Used by tests/PHPUnit/Integration/ImportLogsTest.php and tests/PHPUnit/Integration/UITest.php
use Piwik\Tracker\Cache;
// Wrapping the request inside ob_start() calls to ensure that the Test
// calling us waits for the full request to process before unblocking
ob_start();
Piwik_TestingEnvironment::addHooks();
\Piwik\Tracker::setTestEnvironment();
\Piwik\Profiler::setupProfilerXHProf();
// Disable index.php dispatch since we do it manually below
define('PIWIK_ENABLE_DISPATCH', false);
include PIWIK_INCLUDE_PATH . '/index.php';
$enableZeitgeist = !empty($_REQUEST['zeitgeist']);
$controller = \Piwik\FrontController::getInstance();
\Piwik\Filesystem::deleteAllCacheOnUpdate();
if($enableZeitgeist) {
$replace = "action=getCss";
$response = str_replace($replace, $replace . "&zeitgeist=1", $response);