diff options
author | diosmosis <benakamoorthi@fastmail.fm> | 2014-03-31 22:12:09 +0400 |
---|---|---|
committer | diosmosis <benakamoorthi@fastmail.fm> | 2014-03-31 22:12:09 +0400 |
commit | 0cbf4cccf798cc4c7dbd3541ed1060d27c62adec (patch) | |
tree | 474208f4615bd5d94cbef2acb282a4590213609b /tests | |
parent | a18a995b5a9f0930f85a00d87aa808c071fe3347 (diff) |
Allow global variables to be manipulated through TestingEnvironment class.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/PHPUnit/TestingEnvironment.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/PHPUnit/TestingEnvironment.php b/tests/PHPUnit/TestingEnvironment.php index 3c3ef00e43..b032c72f04 100644 --- a/tests/PHPUnit/TestingEnvironment.php +++ b/tests/PHPUnit/TestingEnvironment.php @@ -95,6 +95,12 @@ class Piwik_TestingEnvironment } } + if ($testingEnvironment->globalsOverride) { + foreach ($testingEnvironment->globalsOverride as $key => $value) { + $GLOBALS[$key] = $value; + } + } + Config::setSingletonInstance(new Config( $testingEnvironment->configFileGlobal, $testingEnvironment->configFileLocal, $testingEnvironment->configFileCommon )); @@ -139,7 +145,6 @@ class Piwik_TestingEnvironment if ($testingEnvironment->configOverride) { $cache = $testingEnvironment->arrayMergeRecursiveDistinct($cache, $testingEnvironment->configOverride); } - }); } Piwik::addAction('Request.dispatch', function() { |