Make travis happy (#282)
This commit is contained in:
parent
bb2ed945fa
commit
01e427cf57
1 changed files with 5 additions and 25 deletions
|
@ -37,11 +37,6 @@ global $CFG;
|
|||
*/
|
||||
class mod_customcert_element_helper_testcase extends advanced_testcase {
|
||||
|
||||
/**
|
||||
* Static variable used for clearing cache
|
||||
*/
|
||||
static $courseId;
|
||||
|
||||
/**
|
||||
* Test set up.
|
||||
*/
|
||||
|
@ -202,9 +197,6 @@ class mod_customcert_element_helper_testcase extends advanced_testcase {
|
|||
// Create a course.
|
||||
$course = $this->getDataGenerator()->create_course();
|
||||
|
||||
// Assign course->id for cache
|
||||
self::$courseId = $course->id;
|
||||
|
||||
// Set that we want 3 decimals to display.
|
||||
grade_set_setting($course->id, 'decimalpoints', 3);
|
||||
|
||||
|
@ -263,6 +255,8 @@ class mod_customcert_element_helper_testcase extends advanced_testcase {
|
|||
$this->assertEquals(null, $grade->get_grade());
|
||||
$this->assertEquals('-', $grade->get_displaygrade());
|
||||
$this->assertEquals(null, $grade->get_dategraded());
|
||||
|
||||
grade_get_setting($course->id, null, null, true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -272,9 +266,6 @@ class mod_customcert_element_helper_testcase extends advanced_testcase {
|
|||
// Create a course.
|
||||
$course = $this->getDataGenerator()->create_course();
|
||||
|
||||
// Assign course->id for cache
|
||||
self::$courseId = $course->id;
|
||||
|
||||
// Set that we want 3 decimals to display.
|
||||
grade_set_setting($course->id, 'decimalpoints', 3);
|
||||
|
||||
|
@ -324,6 +315,8 @@ class mod_customcert_element_helper_testcase extends advanced_testcase {
|
|||
$this->assertEquals(null, $grade->get_grade());
|
||||
$this->assertEquals('-', $grade->get_displaygrade());
|
||||
$this->assertEquals(null, $grade->get_dategraded());
|
||||
|
||||
grade_get_setting($course->id, null, null, true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -333,9 +326,6 @@ class mod_customcert_element_helper_testcase extends advanced_testcase {
|
|||
// Create a course.
|
||||
$course = $this->getDataGenerator()->create_course();
|
||||
|
||||
// Assign course->id for cache
|
||||
self::$courseId = $course->id;
|
||||
|
||||
// Set that we want 3 decimals to display.
|
||||
grade_set_setting($course->id, 'decimalpoints', 3);
|
||||
|
||||
|
@ -387,17 +377,7 @@ class mod_customcert_element_helper_testcase extends advanced_testcase {
|
|||
$this->assertEquals(null, $grade->get_grade());
|
||||
$this->assertEquals('-', $grade->get_displaygrade());
|
||||
$this->assertEquals(null, $grade->get_dategraded());
|
||||
}
|
||||
|
||||
/**
|
||||
* Cleanup after all tests are executed.
|
||||
*
|
||||
*
|
||||
* @static
|
||||
* @return void
|
||||
*/
|
||||
public static function tearDownAfterClass() {
|
||||
// Clear the cache
|
||||
grade_get_setting(self::$courseId, null, null, true);
|
||||
grade_get_setting($course->id, null, null, true);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue