From a262467d58688339346ef15149ef10bcad7426fd Mon Sep 17 00:00:00 2001 From: Tomo Tsuyuki Date: Tue, 11 May 2021 15:53:46 +1000 Subject: [PATCH] Replace admin_write_settings to set_config --- tests/phpunit/local/outagelib_test.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/phpunit/local/outagelib_test.php b/tests/phpunit/local/outagelib_test.php index 597ac10..5944b07 100644 --- a/tests/phpunit/local/outagelib_test.php +++ b/tests/phpunit/local/outagelib_test.php @@ -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) {