From acdf91203c4e2bdbebca71f56d3d7a082a80904e Mon Sep 17 00:00:00 2001 From: Ankit Agarwal Date: Mon, 3 Apr 2017 09:23:58 +0530 Subject: [PATCH] MDL-58465 unittests: Fix invalid use of exception --- course/tests/externallib_test.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/course/tests/externallib_test.php b/course/tests/externallib_test.php index 5b1a6d70006..c0c250d1604 100644 --- a/course/tests/externallib_test.php +++ b/course/tests/externallib_test.php @@ -462,7 +462,7 @@ class core_course_externallib_testcase extends externallib_advanced_testcase { $this->assertEquals($courseinfo->numsections, $course3options['numsections']); $this->assertEquals($courseinfo->coursedisplay, $course3options['coursedisplay']); } else { - throw moodle_exception('Unexpected shortname'); + throw new moodle_exception('Unexpected shortname'); } } @@ -1100,7 +1100,7 @@ class core_course_externallib_testcase extends externallib_advanced_testcase { $this->assertEquals(0, $courseinfo->newsitems); $this->assertEquals(FORMAT_MOODLE, $courseinfo->summaryformat); } else { - throw moodle_exception('Unexpected shortname'); + throw new moodle_exception('Unexpected shortname'); } }