/** * Returns all the plugins having tests * @param string $testtype The kind of test we are looking for, e.g. phpunit|features|stepdefinitions * @return array all the plugins having tests */ private static function get_all_plugins_with_tests($testtype) { $pluginswithtests = array(); $pluginpaths = get_installed_plugins_paths(); foreach ($pluginpaths as $pluginkey => $pluginpath) { // Look for tests recursively if (self::directory_has_tests($pluginpath, $testtype)) { $pluginswithtests[$pluginkey] = $pluginpath; } } return $pluginswithtests; }
/** * Returns hash of all versions including core and all installed plugins except for local * from the current codebase. * * This is relatively slow and not fully cached, use with care! * * @return string sha1 hash */ function get_all_versions_hash() { $versions = array(); // Get core version require get_config('libroot') . 'version.php'; $versions['core'] = $config->version; // All installed plugins $pluginpaths = get_installed_plugins_paths(); foreach ($pluginpaths as $pluginkey => $pluginpath) { require $pluginpath . '/version.php'; $versions[$pluginkey] = $config->version; } return sha1(serialize($versions)); }