MDL-37420 add support for db schemas in auth test
authorPetr Škoda <commits@skodak.org>
Tue, 8 Jan 2013 16:20:42 +0000 (17:20 +0100)
committerPetr Škoda <commits@skodak.org>
Tue, 8 Jan 2013 16:20:42 +0000 (17:20 +0100)
auth/db/tests/db_test.php

index f91b44a..9ca69bc 100644 (file)
@@ -104,7 +104,11 @@ class auth_db_testcase extends advanced_testcase {
             $dbman->drop_table($table);
         }
         $dbman->create_table($table);
-        set_config('table', $CFG->prefix.'auth_db_users', 'auth/db');
+        if (!empty($CFG->dboptions['dbschema'])) {
+            set_config('table', $CFG->dboptions['dbschema'].'.'.$CFG->prefix.'auth_db_users', 'auth/db');
+        } else {
+            set_config('table', $CFG->prefix.'auth_db_users', 'auth/db');
+        }
         set_config('fielduser', 'name', 'auth/db');
         set_config('fieldpass', 'pass', 'auth/db');