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
562dbe408e
commit
2104c9fdc3
1 changed files with 3 additions and 0 deletions
|
@ -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');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue