Created
May 14, 2012 13:58
-
-
Save danpoltawski/2694148 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/mod/workshop/form/rubric/simpletest/testlib.php b/mod/workshop/form/rubric/simpletest/testlib.php | |
index 23dddd2..6ecac70 100644 | |
--- a/mod/workshop/form/rubric/simpletest/testlib.php | |
+++ b/mod/workshop/form/rubric/simpletest/testlib.php | |
@@ -47,6 +47,13 @@ class testable_workshop_rubric_strategy extends workshop_rubric_strategy { | |
public function calculate_peer_grade(array $grades) { | |
return parent::calculate_peer_grade($grades); | |
} | |
+ | |
+ /** | |
+ * Overide load_fields | |
+ */ | |
+ public function load_fields() { | |
+ return array(); | |
+ } | |
} | |
class workshop_rubric_strategy_test extends UnitTestCase { | |
@@ -73,8 +80,6 @@ class workshop_rubric_strategy_test extends UnitTestCase { | |
$context = new stdclass(); | |
$workshop = (object)array('id' => 42, 'strategy' => 'rubric'); | |
$this->workshop = new workshop($workshop, $cm, $course, $context); | |
- $DB->expectOnce('get_records_sql'); | |
- $DB->setReturnValue('get_records_sql', array()); | |
$this->strategy = new testable_workshop_rubric_strategy($this->workshop); | |
// prepare dimensions definition |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment