1
0
mirror of https://github.com/moodle/moodle.git synced 2025-05-12 03:05:42 +02:00

MDL-39233 mod_url: added unittest for get_course_content

This commit is contained in:
Marina Glancy 2014-08-20 16:28:42 +08:00
parent 1b126c0835
commit cdd9c80f1a

@ -582,6 +582,7 @@ class core_course_externallib_testcase extends externallib_advanced_testcase {
$label = $this->getDataGenerator()->create_module('label', array('course' => $course->id,
'intro' => $labeldescription));
$labelcm = get_coursemodule_from_instance('label', $label->id);
$url = $this->getDataGenerator()->create_module('url', array('course' => $course->id));
// Set the required capabilities by the external function.
$context = context_course::instance($course->id);
@ -614,8 +615,8 @@ class core_course_externallib_testcase extends externallib_advanced_testcase {
}
$this->assertEquals(2, $testexecuted);
// Check that the only return section has the 4 created modules
$this->assertEquals(4, count($firstsection['modules']));
// Check that the only return section has the 5 created modules
$this->assertEquals(5, count($firstsection['modules']));
}
/**