mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
MDL-45323 grade: Unit test for grade_get_grade_items_for_activity()
This commit is contained in:
parent
3a34659252
commit
1468444f42
@ -50,4 +50,15 @@ class core_grade_querylib_testcase extends advanced_testcase {
|
||||
$this->assertEquals(1, count($cms));
|
||||
$this->assertTrue(isset($cms[$forum1->cmid]));
|
||||
}
|
||||
|
||||
public function test_grade_get_grade_items_for_activity() {
|
||||
$this->resetAfterTest(true);
|
||||
|
||||
$course = $this->getDataGenerator()->create_course();
|
||||
$forum = $this->getDataGenerator()->create_module('forum', array('course'=>$course->id));
|
||||
$cm = get_coursemodule_from_id('forum', $forum->cmid, $forum->course);
|
||||
unset($cm->modname);
|
||||
$grade = grade_get_grade_items_for_activity($cm);
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user