Assert the list of modules are enabled or disabled.
$modules: Module list to check.
$enabled: Expected module state.
function assertModules(array $modules, $enabled) {
system_list_reset();
foreach ($modules as $module) {
if ($enabled) {
$message = 'Module "@module" is enabled.';
}
else {
$message = 'Module "@module" is not enabled.';
}
$this
->assertEqual(module_exists($module), $enabled, format_string($message, array(
'@module' => $module,
)));
}
}