MDL-35714 run gc before test reset

This commit is contained in:
Petr Škoda 2012-10-02 13:35:32 +02:00
parent ccd90e765e
commit d03d5113f9

View file

@ -547,6 +547,9 @@ class phpunit_util {
public static function reset_all_data($logchanges = false) { public static function reset_all_data($logchanges = false) {
global $DB, $CFG, $USER, $SITE, $COURSE, $PAGE, $OUTPUT, $SESSION, $GROUPLIB_CACHE; 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();
// Show any unhandled debugging messages, the runbare() could already reset it. // Show any unhandled debugging messages, the runbare() could already reset it.
self::display_debugging_messages(); self::display_debugging_messages();
self::reset_debugging(); self::reset_debugging();