Commit 0113f3d7 authored by Dries's avatar Dries
Browse files

Issue #1850158 by sun, tim.plunkett, xjm: bugged assumption in...

Issue #1850158 by sun, tim.plunkett, xjm: bugged assumption in ModuleTestBase::assertModuleConfig().
parent b54a659d
......@@ -99,13 +99,18 @@ function assertModuleConfig($module) {
$module_file_storage = new FileStorage($module_config_dir);
$names = $module_file_storage->listAll($module . '.');
// Verify that the config directory is not empty.
// Verify that the module's default config directory is not empty and
// contains default configuration files (instead of something else).
$all_names = $module_file_storage->listAll();
// Look up each default configuration object name in the active
// configuration, and if it exists, remove it from the stack.
// Only default config that belongs to $module is guaranteed to exist; any
// other default config depends on whether other modules are enabled. Thus,
// list all default config once more, but filtered by $module.
$names = $module_file_storage->listAll($module . '.');
foreach ($names as $key => $name) {
if (config($name)->get()) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment