mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-35714 run gc before test reset
This commit is contained in:
parent
ccd90e765e
commit
d03d5113f9
1 changed files with 3 additions and 0 deletions
|
@ -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();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue