MDL-43440 unit testing: Use cmid in unit tests when it should be used.

instance is has been used instead of cmid.  This works as all id's are 1
in most cases, but not always.

accesslib_clear_all_caches_for_unit_testing was updated to clear the
$USER->access cache which would fail test when the wrong user's data was used.

Conflicts from extra tests in master:
	blocks/comments/tests/events_test.php
	mod/assign/submission/comments/tests/events_test.php
	mod/data/tests/lib_test.php
	mod/glossary/tests/events_test.php
This commit is contained in:
Russell Smith
2014-01-24 14:56:53 +11:00
parent b88bb98ab7
commit cac73cf1ec
15 changed files with 30 additions and 30 deletions
+1 -1
View File
@@ -104,4 +104,4 @@ class data_lib_testcase extends advanced_testcase {
// Make sure the function returns true on a successful deletion.
$this->assertTrue($result);
}
}
}