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 /plugins/TestRunner | |
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 'plugins/TestRunner')
-rw-r--r-- | plugins/TestRunner/Commands/TestsSetupFixture.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/TestRunner/Commands/TestsSetupFixture.php b/plugins/TestRunner/Commands/TestsSetupFixture.php index 94d88c1bf8..b41ed4bd70 100644 --- a/plugins/TestRunner/Commands/TestsSetupFixture.php +++ b/plugins/TestRunner/Commands/TestsSetupFixture.php @@ -8,8 +8,11 @@ namespace Piwik\Plugins\TestRunner\Commands; +use Piwik\Application\Environment; use Piwik\Config; use Piwik\Plugin\ConsoleCommand; +use Piwik\Tests\Framework\TestingEnvironmentManipulator; +use Piwik\Tests\Framework\TestingEnvironmentVariables; use Piwik\Url; use Piwik\Tests\Framework\Fixture; use Symfony\Component\Console\Input\InputArgument; @@ -92,6 +95,8 @@ class TestsSetupFixture extends ConsoleCommand define('PIWIK_TEST_MODE', true); } + Environment::setGlobalEnvironmentManipulator(new TestingEnvironmentManipulator(new TestingEnvironmentVariables())); + $serverGlobal = $input->getOption('server-global'); if ($serverGlobal) { $_SERVER = json_decode($serverGlobal, true); |