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:
David Mudrák
2016-11-10 09:55:59 +01:00
parent 688a698dc2
commit 93ccd9a8ed
+2 -2
View File
@@ -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);
}
/**