MDL-47675 phpunit: Update unit tests to pass on MSSQL

Unit tests were failing on MSSQL. gc_collect_cycles() was
removed from the phpunit utils.php file to save time in running
the tests, but MSSQL doesn't clean up open files as well as
other databases.

This patch includes the garbage collection for the unit tests
that require it.
This commit is contained in:
Adrian Greeve 2014-10-20 14:21:53 +08:00
parent b49de5d930
commit c42d18183a
7 changed files with 49 additions and 0 deletions

View file

@ -38,6 +38,13 @@ require_once($CFG->libdir . '/completionlib.php');
*/
class core_backup_moodle2_testcase extends advanced_testcase {
/**
* Tidy up open files that may be left open.
*/
protected function tearDown() {
gc_collect_cycles();
}
/**
* Tests the availability field on modules and sections is correctly
* backed up and restored.