Skip to content

Commit

Permalink
MDL-38359 courselib: Fix unit tests
Browse files Browse the repository at this point in the history
The courselib tests have hardcoded test data sets for forum and assign
modules that need to be updated every time we add a new feature.
  • Loading branch information
Damyon Wiese committed Jun 11, 2013
1 parent e2ac6a8 commit 7f19835
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions course/tests/courselib_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ private function assign_create_set_values(&$moduleinfo) {
$moduleinfo->requireallteammemberssubmit = true;
$moduleinfo->teamsubmissiongroupingid = true;
$moduleinfo->blindmarking = true;
$moduleinfo->markingworkflow = true;
$moduleinfo->markingallocation = true;
$moduleinfo->assignsubmission_onlinetext_enabled = true;
$moduleinfo->assignsubmission_file_enabled = true;
$moduleinfo->assignsubmission_file_maxfiles = 1;
Expand Down Expand Up @@ -134,6 +136,8 @@ private function assign_create_run_asserts($moduleinfo, $dbmodinstance) {
$this->assertEquals($moduleinfo->requireallteammemberssubmit, $dbmodinstance->requireallteammemberssubmit);
$this->assertEquals($moduleinfo->teamsubmissiongroupingid, $dbmodinstance->teamsubmissiongroupingid);
$this->assertEquals($moduleinfo->blindmarking, $dbmodinstance->blindmarking);
$this->assertEquals($moduleinfo->markingworkflow, $dbmodinstance->markingworkflow);
$this->assertEquals($moduleinfo->markingallocation, $dbmodinstance->markingallocation);
// The goal not being to fully test assign_add_instance() we'll stop here for the assign tests - to avoid too many DB queries.

// Advanced grading.
Expand Down

0 comments on commit 7f19835

Please sign in to comment.