Merge branch 'w41_MDL-35714_m23_testgc' of git://github.com/skodak/moodle into MOODLE_23_STABLE

This commit is contained in:
Eloy Lafuente (stronk7)
2012-10-08 22:52:12 +02:00
+3
View File
@@ -544,6 +544,9 @@ class phpunit_util {
public static function reset_all_data($logchanges = false) {
global $DB, $CFG, $USER, $SITE, $COURSE, $PAGE, $OUTPUT, $SESSION, $GROUPLIB_CACHE;
// Release memory and indirectly call destroy() methods to release resource handles, etc.
gc_collect_cycles();
// reset global $DB in case somebody mocked it
$DB = self::get_global_backup('DB');