Skip to content
Extraits de code Groupes Projets
Valider ec98bc00 rédigé par mattpiwik's avatar mattpiwik
Parcourir les fichiers

Refs #3227 removing old proxy-piwik.php to use phpunit proxy/piwik.php instead...

Refs #3227 removing old proxy-piwik.php to use phpunit proxy/piwik.php instead (committed in [6743] )

git-svn-id: http://dev.piwik.org/svn/trunk@6744 59fd770c-687e-43c8-a1e3-f5a4ff64c105
parent f77bb431
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -268,7 +268,7 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase ...@@ -268,7 +268,7 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase
*/ */
protected static function getTrackerUrl() protected static function getTrackerUrl()
{ {
return self::getRootUrl().'tests/PHPUnit/proxy-piwik.php'; return self::getRootUrl().'tests/PHPUnit/proxy/piwik.php';
} }
/** /**
......
...@@ -302,7 +302,7 @@ abstract class Test_Integration extends Test_Database_Base ...@@ -302,7 +302,7 @@ abstract class Test_Integration extends Test_Database_Base
*/ */
protected function getTrackerUrl() protected function getTrackerUrl()
{ {
return $this->getRootUrl().'tests/PHPUnit/proxy-piwik.php'; return $this->getRootUrl().'tests/PHPUnit/proxy/piwik.php';
} }
/** /**
......
<?php
/**
* Proxy to normal piwik.php, but in testing mode
*
* - Use the tests database to record Tracking data
* - Allows to overwrite the Visitor IP, and Server datetime
*
* @see Main.test.php
*
*/
// 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();
define('PIWIK_INCLUDE_PATH', '../..');
define('PIWIK_USER_PATH', PIWIK_INCLUDE_PATH);
require_once PIWIK_INCLUDE_PATH .'/libs/upgradephp/upgrade.php';
require_once PIWIK_INCLUDE_PATH .'/core/Loader.php';
// Config files forced to use the test database
// Note that this also provides security for Piwik installs containing tests files:
// this proxy will not record any data in the production database.
Piwik::createConfigObject();
Piwik_Config::getInstance()->setTestEnvironment();
Piwik_Config::getInstance()->PluginsInstalled['PluginsInstalled'] = array();
Piwik_Tracker::setTestEnvironment();
include '../../piwik.php';
ob_flush();
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter