MDL-62425 tool_dataprivacy: Add core to the list of components
This commit is contained in:
@@ -122,11 +122,15 @@ class metadata_registry {
|
||||
* @return array An array of plugin types which contain plugin data.
|
||||
*/
|
||||
protected function get_full_component_list() {
|
||||
global $CFG;
|
||||
|
||||
$list = \core_component::get_component_list();
|
||||
$list['core']['core'] = "{$CFG->dirroot}/lib";
|
||||
$formattedlist = [];
|
||||
foreach ($list as $plugintype => $plugin) {
|
||||
$formattedlist[] = ['plugin_type' => $plugintype, 'plugins' => array_keys($plugin)];
|
||||
}
|
||||
|
||||
return $formattedlist;
|
||||
}
|
||||
|
||||
|
||||
@@ -72,8 +72,9 @@ class tool_dataprivacy_metadata_registry_testcase extends advanced_testcase {
|
||||
}
|
||||
|
||||
// Let's check core subsystems.
|
||||
// The Privacy API adds an extra component in the form of 'core'.
|
||||
$coresubsystems = \core_component::get_core_subsystems();
|
||||
$this->assertEquals(count($coresubsystems), count($data['core']));
|
||||
$this->assertEquals(count($coresubsystems) + 1, count($data['core']));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user