Skip to content

Commit

Permalink
MDL-49718 externallib: unittest correction
Browse files Browse the repository at this point in the history
  • Loading branch information
marinaglancy authored and David Monllao committed May 6, 2015
1 parent 1bd3c5b commit 46be1d5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions course/tests/externallib_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,8 @@ public function test_get_categories() {
$generatedcat = $generatedcats[$category['id']];
$this->assertEquals($category['idnumber'], $generatedcat->idnumber);
$this->assertEquals($category['name'], $generatedcat->name);
$this->assertEquals($category['description'], $generatedcat->description);
// Description was converted to the HTML format.
$this->assertEquals($category['description'], format_text($generatedcat->description, FORMAT_MOODLE, array('para' => false)));
$this->assertEquals($category['descriptionformat'], FORMAT_HTML);
}

Expand Down Expand Up @@ -560,7 +561,8 @@ public function test_get_courses () {
$dbcourse = $generatedcourses[$course['id']];
$this->assertEquals($course['idnumber'], $dbcourse->idnumber);
$this->assertEquals($course['fullname'], $dbcourse->fullname);
$this->assertEquals($course['summary'], $dbcourse->summary);
// Summary was converted to the HTML format.
$this->assertEquals($course['summary'], format_text($dbcourse->summary, FORMAT_MOODLE, array('para' => false)));
$this->assertEquals($course['summaryformat'], FORMAT_HTML);
$this->assertEquals($course['shortname'], $dbcourse->shortname);
$this->assertEquals($course['categoryid'], $dbcourse->category);
Expand Down

0 comments on commit 46be1d5

Please sign in to comment.