diff options
author | Benaka <diosmosis@users.noreply.github.com> | 2015-06-11 05:12:44 +0300 |
---|---|---|
committer | Benaka <diosmosis@users.noreply.github.com> | 2015-06-11 05:12:44 +0300 |
commit | ccef590f79453e56c015ecab0a444c13e756f091 (patch) | |
tree | 07e056cf1d4246c43951724c5cfb6167dd34c14a /misc | |
parent | f982eed9d1467ff63f5a643a8e7db7b6077c1fa6 (diff) | |
parent | 4b1dbdeeb6fca0d53789a65ebfda2c0638f7b73f (diff) |
Merge pull request #8027 from piwik/test_env_di_8
Injection Inception, Change #6: Final cleanup of test environment setup. Remove TestingEnvironment.addHooks event, make sure core doesn't depend on test files/classes/constants, integrate test environment variables w/ DI for easier overriding in tests, and related clean ups to test environment setup.
Diffstat (limited to 'misc')
-rw-r--r-- | misc/cron/updatetoken.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/misc/cron/updatetoken.php b/misc/cron/updatetoken.php index 5664b89294..c06684e4a3 100644 --- a/misc/cron/updatetoken.php +++ b/misc/cron/updatetoken.php @@ -12,6 +12,8 @@ namespace Piwik; use Piwik\Application\Environment; +use Piwik\Tests\Framework\TestingEnvironmentManipulator; +use Piwik\Tests\Framework\TestingEnvironmentVariables; if (!defined('PIWIK_INCLUDE_PATH')) { define('PIWIK_INCLUDE_PATH', realpath(dirname(__FILE__) . "/../..")); @@ -35,7 +37,7 @@ $testmode = in_array('--testmode', $_SERVER['argv']); if ($testmode) { define('PIWIK_TEST_MODE', true); - Tests\Framework\TestingEnvironment::addHooks(); + Environment::setGlobalEnvironmentManipulator(new TestingEnvironmentManipulator(new TestingEnvironmentVariables())); } function getPiwikDomain() |