MDL-53481 availability: Fix unit test to not execute the huge query
Some DBs have troubles to execute such a huge query as generated in this test. We do not actually need to execute it. All we need is to make sure that the parameter placeholders are enumerated correctly. So it is what this new test does.
This commit is contained in:
@@ -728,8 +728,8 @@ class tree_testcase extends \advanced_testcase {
|
||||
shuffle($conditions);
|
||||
$tree = new tree(tree::get_root_json($conditions));
|
||||
list($sql, $params) = $tree->get_user_list_sql(false, $info, false);
|
||||
$result = $DB->get_fieldset_sql($sql, $params);
|
||||
$this->assertEquals(array($user->id), $result);
|
||||
// This must not throw exception.
|
||||
$DB->fix_sql_params($sql, $params);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user