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/core
diff options
context:
space:
mode:
authormattab <matthieu.aubry@gmail.com>2014-04-03 06:35:51 +0400
committermattab <matthieu.aubry@gmail.com>2014-04-03 06:35:51 +0400
commit4cc825950ac7f3aa965de47b2196c23d99989548 (patch)
tree54dd921f0e17d9e2c60a5fb25d080bf9ed1180ff /core
parentffec1b81dd7694ec1129c1e37e7b27ebeb385230 (diff)
Add new config flag for developers: enable_load_standalone_plugins_during_tests = 1
it can be set to 0 to disable the loading of third party plugins when running tests
Diffstat (limited to 'core')
-rw-r--r--core/Plugin/Manager.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/core/Plugin/Manager.php b/core/Plugin/Manager.php
index 4bd1cc1d8c..825c6fcaa4 100644
--- a/core/Plugin/Manager.php
+++ b/core/Plugin/Manager.php
@@ -11,6 +11,7 @@ namespace Piwik\Plugin;
use Piwik\Common;
use Piwik\Config as PiwikConfig;
+use Piwik\Config;
use Piwik\EventDispatcher;
use Piwik\Filesystem;
use Piwik\Option;
@@ -101,7 +102,15 @@ class Manager extends Singleton
// Also load plugins which are Git repositories (eg. being developed)
$isPluginHasGitRepository = file_exists( PIWIK_INCLUDE_PATH . '/plugins/' . $plugin . '/.git/config');
- $loadPlugin = $isPluginBundledWithCore || $isPluginOfficiallySupported || $isPluginHasGitRepository;
+ $loadPlugin = $isPluginBundledWithCore || $isPluginOfficiallySupported;
+
+ $loadStandalonePluginsDuringTests = Config::getInstance()->Debug['enable_load_standalone_plugins_during_tests'];
+
+ if($loadStandalonePluginsDuringTests) {
+ $loadPlugin = $loadPlugin || $isPluginHasGitRepository;
+ } else {
+ $loadPlugin = $loadPlugin && !$isPluginHasGitRepository;
+ }
// Do not enable other Themes
$disabledThemes = $this->coreThemesDisabledByDefault;