Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authordiosmosis <benakamoorthi@fastmail.fm>2014-03-31 22:12:09 +0400
committerdiosmosis <benakamoorthi@fastmail.fm>2014-03-31 22:12:09 +0400
commit0cbf4cccf798cc4c7dbd3541ed1060d27c62adec (patch)
tree474208f4615bd5d94cbef2acb282a4590213609b /tests
parenta18a995b5a9f0930f85a00d87aa808c071fe3347 (diff)
Allow global variables to be manipulated through TestingEnvironment class.
Diffstat (limited to 'tests')
-rw-r--r--tests/PHPUnit/TestingEnvironment.php7
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() {