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
diff options
context:
space:
mode:
authordiosmosis <benaka@piwik.pro>2015-06-19 07:38:40 +0300
committerdiosmosis <benaka@piwik.pro>2015-06-20 03:09:13 +0300
commitce1d65eaace72a5a8d64108a8c6f8ad15dba97a8 (patch)
tree4c10e0c7611bef87e5b2c67a5cc1ef4eb44ebb7a /tests/PHPUnit/Framework/TestingEnvironmentManipulator.php
parent33f9db56a7a823208ac99e0f977e8d8d9e071307 (diff)
In TestingEnvironmentManipulator, set Plugins in GLobalSettingsProvider instead of always returning the list of plugins in getActivatedPlugins(). This makes sure tests that activate/deactive plugins will affect config in memory. Otherwise they won't have the complete effect.
Diffstat (limited to 'tests/PHPUnit/Framework/TestingEnvironmentManipulator.php')
-rw-r--r--tests/PHPUnit/Framework/TestingEnvironmentManipulator.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/PHPUnit/Framework/TestingEnvironmentManipulator.php b/tests/PHPUnit/Framework/TestingEnvironmentManipulator.php
index 5da8741e88..ad21419362 100644
--- a/tests/PHPUnit/Framework/TestingEnvironmentManipulator.php
+++ b/tests/PHPUnit/Framework/TestingEnvironmentManipulator.php
@@ -24,11 +24,10 @@ class FakePluginList extends PluginList
parent::__construct($globalSettingsProvider);
$this->plugins = $this->sortPlugins($plugins);
- }
- public function getActivatedPlugins()
- {
- return $this->plugins;
+ $section = $globalSettingsProvider->getSection('Plugins');
+ $section['Plugins'] = $this->plugins;
+ $globalSettingsProvider->setSection('Plugins', $section);
}
}