mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-40552 course: fixup unit test
Previously there was an assertion which was never used, now we ensure to test the course themes functionality each time.
This commit is contained in:
parent
d87bcfb325
commit
141e7d8747
1 changed files with 3 additions and 4 deletions
|
@ -335,6 +335,8 @@ class core_course_externallib_testcase extends externallib_advanced_testcase {
|
||||||
|
|
||||||
// Enable course completion.
|
// Enable course completion.
|
||||||
set_config('enablecompletion', 1);
|
set_config('enablecompletion', 1);
|
||||||
|
// Enable course themes.
|
||||||
|
set_config('allowcoursethemes', 1);
|
||||||
|
|
||||||
// Set the required capabilities by the external function
|
// Set the required capabilities by the external function
|
||||||
$contextid = context_system::instance()->id;
|
$contextid = context_system::instance()->id;
|
||||||
|
@ -415,10 +417,7 @@ class core_course_externallib_testcase extends externallib_advanced_testcase {
|
||||||
$this->assertEquals($courseinfo->defaultgroupingid, $course2['defaultgroupingid']);
|
$this->assertEquals($courseinfo->defaultgroupingid, $course2['defaultgroupingid']);
|
||||||
$this->assertEquals($courseinfo->completionnotify, $course2['completionnotify']);
|
$this->assertEquals($courseinfo->completionnotify, $course2['completionnotify']);
|
||||||
$this->assertEquals($courseinfo->lang, $course2['lang']);
|
$this->assertEquals($courseinfo->lang, $course2['lang']);
|
||||||
|
$this->assertEquals($courseinfo->theme, $course2['forcetheme']);
|
||||||
if (!empty($CFG->allowcoursethemes)) {
|
|
||||||
$this->assertEquals($courseinfo->theme, $course2['forcetheme']);
|
|
||||||
}
|
|
||||||
|
|
||||||
// We enabled completion at the beginning of the test.
|
// We enabled completion at the beginning of the test.
|
||||||
$this->assertEquals($courseinfo->enablecompletion, $course2['enablecompletion']);
|
$this->assertEquals($courseinfo->enablecompletion, $course2['enablecompletion']);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue