diff options
author | diosmosis <benaka@piwik.pro> | 2015-06-19 07:38:40 +0300 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2015-06-20 03:09:13 +0300 |
commit | ce1d65eaace72a5a8d64108a8c6f8ad15dba97a8 (patch) | |
tree | 4c10e0c7611bef87e5b2c67a5cc1ef4eb44ebb7a /tests/PHPUnit/Framework/TestingEnvironmentManipulator.php | |
parent | 33f9db56a7a823208ac99e0f977e8d8d9e071307 (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.php | 7 |
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); } } |