diff options
author | Justin Velluppillai <justin@innocraft.com> | 2021-10-07 06:34:56 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-07 06:34:56 +0300 |
commit | 70b81653e8a904a52222b5a0eef67112b1034db2 (patch) | |
tree | 1d8f844f12ef2e19552367f78f7ec44fa4c5f31a /tests | |
parent | caaefb2687a7edb38fc1895f1eeac244267cbb8b (diff) |
Merge 4.5.0 release (#18105)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/PHPUnit/Framework/TestingEnvironmentManipulator.php | 9 | ||||
-rw-r--r-- | tests/PHPUnit/bootstrap.php | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/PHPUnit/Framework/TestingEnvironmentManipulator.php b/tests/PHPUnit/Framework/TestingEnvironmentManipulator.php index 8a836b0e39..a7c36567cb 100644 --- a/tests/PHPUnit/Framework/TestingEnvironmentManipulator.php +++ b/tests/PHPUnit/Framework/TestingEnvironmentManipulator.php @@ -33,6 +33,15 @@ class FakePluginList extends PluginList $section['Plugins'] = $this->plugins; $globalSettingsProvider->setSection('Plugins', $section); } + + public function sortPlugins(array $plugins) + { + if (isset($GLOBALS['MATOMO_SORT_PLUGINS']) && is_callable($GLOBALS['MATOMO_SORT_PLUGINS'])) { + return call_user_func($GLOBALS['MATOMO_SORT_PLUGINS'], parent::sortPlugins($plugins)); + } + + return parent::sortPlugins($plugins); + } } /** diff --git a/tests/PHPUnit/bootstrap.php b/tests/PHPUnit/bootstrap.php index f74696e954..17e57c7837 100644 --- a/tests/PHPUnit/bootstrap.php +++ b/tests/PHPUnit/bootstrap.php @@ -25,6 +25,10 @@ if (!defined('PIWIK_INCLUDE_PATH')) { define('PIWIK_INCLUDE_PATH', PIWIK_PATH_TEST_TO_ROOT); } +if (file_exists(PIWIK_DOCUMENT_ROOT . '/bootstrap.php')) { + require_once PIWIK_DOCUMENT_ROOT . '/bootstrap.php'; +} + if (!defined('PIWIK_INCLUDE_SEARCH_PATH')) { define('PIWIK_INCLUDE_SEARCH_PATH', get_include_path() . PATH_SEPARATOR . PIWIK_INCLUDE_PATH . '/vendor/bin' |