From cdd9c80f1ad1517814d9f3cf2fe3d3eebbb5495c Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Wed, 20 Aug 2014 16:28:42 +0800 Subject: [PATCH] MDL-39233 mod_url: added unittest for get_course_content --- course/tests/externallib_test.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/course/tests/externallib_test.php b/course/tests/externallib_test.php index a83ca835ecc..13826b87809 100644 --- a/course/tests/externallib_test.php +++ b/course/tests/externallib_test.php @@ -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'])); } /**