MDL-52219 phpunit: updated for new defaults

The externallib assertion was previously never being run and had a typo..
This commit is contained in:
Dan Poltawski 2015-11-24 14:41:22 +00:00
parent aa306e7bc8
commit 8be9cffb8b
2 changed files with 4 additions and 4 deletions

View File

@ -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.

View File

@ -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);