mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 08:22:07 +02:00
MDL-52219 phpunit: updated for new defaults
The externallib assertion was previously never being run and had a typo..
This commit is contained in:
parent
aa306e7bc8
commit
8be9cffb8b
@ -45,9 +45,10 @@ class info_testcase extends advanced_testcase {
|
||||
* Tests the info_module class (is_available, get_full_information).
|
||||
*/
|
||||
public function test_info_module() {
|
||||
global $DB;
|
||||
global $DB, $CFG;
|
||||
|
||||
// Create a course and pages.
|
||||
$CFG->enableavailability = 0;
|
||||
$this->setAdminUser();
|
||||
$this->resetAfterTest();
|
||||
$generator = $this->getDataGenerator();
|
||||
@ -160,6 +161,7 @@ class info_testcase extends advanced_testcase {
|
||||
global $CFG, $DB;
|
||||
require_once($CFG->dirroot . '/course/lib.php');
|
||||
$this->resetAfterTest();
|
||||
$CFG->enableavailability = 0;
|
||||
|
||||
// Create a course and some pages:
|
||||
// 0. Invisible due to visible=0.
|
||||
|
@ -1041,9 +1041,7 @@ class core_course_externallib_testcase extends externallib_advanced_testcase {
|
||||
$this->assertEquals($course2['forcetheme'], $courseinfo->theme);
|
||||
}
|
||||
|
||||
if (completion_info::is_enabled_for_site()) {
|
||||
$this->assertEquals($course2['enabledcompletion'], $courseinfo->enablecompletion);
|
||||
}
|
||||
$this->assertEquals($course2['enablecompletion'], $courseinfo->enablecompletion);
|
||||
} else if ($course['id'] == $course1['id']) {
|
||||
$this->assertEquals($course1['fullname'], $courseinfo->fullname);
|
||||
$this->assertEquals($course1['shortname'], $courseinfo->shortname);
|
||||
|
Loading…
x
Reference in New Issue
Block a user