[ticket/16510] Exclude deleted config entries in test

PHPBB3-16510
This commit is contained in:
kasimi 2020-06-06 21:48:15 +02:00
parent 5e23959e12
commit b5a1c54ab2
No known key found for this signature in database
GPG key ID: 3163AB573241193A

View file

@ -94,29 +94,28 @@ class migrations_check_config_added_test extends phpbb_test_case
continue; continue;
} }
$config_name = $step[1][0];
// Exclude removed configuration options and filter them out // Exclude removed configuration options and filter them out
if ($step[0] == 'config.remove') if ($step[0] == 'config.remove')
{ {
if (!isset($config_removed[$step[1][0]])) if (!isset($config_removed[$config_name]))
{ {
$config_removed[$step[1][0]] = true; $config_removed[$config_name] = true;
} }
continue; continue;
} }
$action = explode('.', $step[0]);
$method = $action[1];
$config_name = $step[1][0];
// Fill error entries for configuration options which were not added to shema_data.sql // Fill error entries for configuration options which were not added to shema_data.sql
if (!isset($config_names[$config_name]) && !isset($config_removed[$config_name])) if (!isset($config_names[$config_name]))
{ {
$config_names[$config_name] = [$config_name, $class]; $config_names[$config_name] = [$config_name, $class];
} }
} }
} }
// Drop configuration options which were removed by config.remove
$config_names = array_diff_key($config_names, $config_removed);
return $config_names; return $config_names;
} }