// Move ban to the end of the array.
unset($module_list[array_search('ban',
$module_list)]);
$module_list[] = 'ban';
$this->
assertModuleList($module_list, 'After changing weights'
);
// Test the fixed list feature.
$fixed_list =
[ 'system' => 'core/modules/system/system.module',
'menu' => 'core/modules/menu/menu.module',
];
$this->
moduleHandler()->
setModuleList($fixed_list);
$new_module_list =
array_combine(array_keys($fixed_list),
array_keys($fixed_list));
$this->
assertModuleList($new_module_list, 'When using a fixed list'
);
} /**
* Assert that the extension handler returns the expected values.
*
* @param array $expected_values
* The expected values, sorted by weight and module name.
* @param string $condition
* The condition being tested, such as 'After adding a module'.
*
* @internal
*/