Skip to content

Commit

Permalink
MDL-52219 phpunit: updated for new defaults
Browse files Browse the repository at this point in the history
The externallib assertion was previously never being run and had a typo..
  • Loading branch information
danpoltawski committed Nov 26, 2015
1 parent aa306e7 commit 8be9cff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 3 additions & 1 deletion availability/tests/info_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ public function setUp() {
* 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();
Expand Down Expand Up @@ -160,6 +161,7 @@ public function test_is_user_visible() {
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.
Expand Down
4 changes: 1 addition & 3 deletions course/tests/externallib_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -1041,9 +1041,7 @@ public function test_update_courses() {
$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);
Expand Down

0 comments on commit 8be9cff

Please sign in to comment.