Permalink
Browse files

MDL-36061 - remove master-only unit tests

  • Loading branch information...
danpoltawski committed Nov 15, 2012
1 parent 43c6aa9 commit 153f5eb3c7e9281c92a7ef64f334075bfb037df2
Showing with 4 additions and 17 deletions.
  1. +0 −5 lib/grade/tests/grade_item_test.php
  2. +4 −12 lib/tests/gradelib_test.php
@@ -489,11 +489,6 @@ protected function sub_test_refresh_grades() {
$grade_item = new grade_item($this->grade_items[0], false);
$this->assertTrue(method_exists($grade_item, 'refresh_grades'));
$this->assertTrue($grade_item->refresh_grades());
-
- // Break the grade item and check error handling.
- $grade_item->iteminstance = 123456789;
- $this->assertFalse($grade_item->refresh_grades());
- $this->assertDebuggingCalled();
}
protected function sub_test_grade_item_is_calculated() {
@@ -34,25 +34,17 @@ public function test_grade_update_mod_grades() {
$this->resetAfterTest(true);
- // Create a broken module instance.
- $modinstance = new stdClass();
- $modinstance->modname = 'doesntexist';
-
- $this->assertFalse(grade_update_mod_grades($modinstance));
- // A debug message should have been generated.
- $this->assertDebuggingCalled();
-
- // Create a course and instance of mod_assign.
+ // Create a course and instance of mod_assignment.
$course = $this->getDataGenerator()->create_course();
$assigndata['course'] = $course->id;
$assigndata['name'] = 'lightwork assignment';
- $modinstance = self::getDataGenerator()->create_module('assign', $assigndata);
+ $modinstance = self::getDataGenerator()->create_module('assignment', $assigndata);
// grade_update_mod_grades() requires 2 additional properties, cmidnumber and modname.
- $cm = get_coursemodule_from_instance('assign', $modinstance->id, 0, false, MUST_EXIST);
+ $cm = get_coursemodule_from_instance('assignment', $modinstance->id, 0, false, MUST_EXIST);
$modinstance->cmidnumber = $cm->id;
- $modinstance->modname = 'assign';
+ $modinstance->modname = 'assignment';
$this->assertTrue(grade_update_mod_grades($modinstance));
}

0 comments on commit 153f5eb

Please sign in to comment.