Issue #189: Updated unit tests

This commit is contained in:
Peter Burnett
2020-03-25 15:15:02 +10:00
parent 4467bea1cf
commit 777e466a0a

View File

@@ -289,6 +289,7 @@ class outagelib_test extends advanced_testcase {
if ((time() >= 123) && (time() < 456)) {
define('MOODLE_INTERNAL', true);
require_once($CFG->dirroot.'/lib/moodlelib.php');
require_once($CFG->dirroot.'/lib/classes/ip_utils.php');
if (!remoteip_in_list('hey\'\"you
a.b.c.d
e.e.e.e/20')) {
@@ -330,6 +331,7 @@ EOT;
if ((time() >= 123) && (time() < 456)) {
define('MOODLE_INTERNAL', true);
require_once($CFG->dirroot.'/lib/moodlelib.php');
require_once($CFG->dirroot.'/lib/classes/ip_utils.php');
if (!remoteip_in_list('127.0.0.1')) {
header($_SERVER['SERVER_PROTOCOL'] . ' 503 Moodle under maintenance');
header('Status: 503 Moodle under maintenance');