Issue #1850158 by sun, tim.plunkett, xjm: bugged assumption in ModuleTestBase::assertModuleConfig().
parent
b54a659de1
commit
0113f3d731
|
@ -99,13 +99,18 @@ abstract class ModuleTestBase extends WebTestBase {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$module_file_storage = new FileStorage($module_config_dir);
|
$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
|
||||||
$this->assertTrue($names);
|
// contains default configuration files (instead of something else).
|
||||||
|
$all_names = $module_file_storage->listAll();
|
||||||
|
$this->assertTrue($all_names);
|
||||||
|
|
||||||
// Look up each default configuration object name in the active
|
// Look up each default configuration object name in the active
|
||||||
// configuration, and if it exists, remove it from the stack.
|
// 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) {
|
foreach ($names as $key => $name) {
|
||||||
if (config($name)->get()) {
|
if (config($name)->get()) {
|
||||||
unset($names[$key]);
|
unset($names[$key]);
|
||||||
|
|
Loading…
Reference in New Issue