mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
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:
parent
b49de5d930
commit
c42d18183a
7 changed files with 49 additions and 0 deletions
|
@ -51,6 +51,13 @@ class core_questionlib_testcase extends advanced_testcase {
|
|||
$this->resetAfterTest();
|
||||
}
|
||||
|
||||
/**
|
||||
* Tidy up open files that may be left open.
|
||||
*/
|
||||
protected function tearDown() {
|
||||
gc_collect_cycles();
|
||||
}
|
||||
|
||||
public function test_question_reorder_qtypes() {
|
||||
$this->assertEquals(
|
||||
array(0 => 't2', 1 => 't1', 2 => 't3'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue