Merge pull request #252 from catalyst/cherry-pick-update_test_using_set_config

Replace admin_write_settings to set_config
This commit is contained in:
Tomo
2021-05-11 16:46:40 +10:00
committed by GitHub

View File

@@ -443,9 +443,7 @@ EOT;
$this->create_outage();
// Change settings.
admin_write_settings((object)[
's_auth_outage_allowedips' => '127',
]);
set_config('s_auth_outage_allowedips', '127', 'auth_outage');
// The method outagelib::prepare_next_outage() should have been called from admin_write_settings().
foreach ([$CFG->dataroot.'/climaintenance.template.html', $CFG->dataroot.'/climaintenance.php'] as $file) {
@@ -463,9 +461,7 @@ EOT;
$this->create_outage();
// Change settings.
admin_write_settings((object)[
's_auth_outage_remove_selectors' => '.something',
]);
set_config('s_auth_outage_remove_selectors', '.something', 'auth_outage');
// The method outagelib::prepare_next_outage() should have been called from admin_write_settings().
foreach ([$CFG->dataroot.'/climaintenance.template.html', $CFG->dataroot.'/climaintenance.php'] as $file) {