diff --git a/core/lib/Drupal/Core/Database/Install/Tasks.php b/core/lib/Drupal/Core/Database/Install/Tasks.php
index bc05bdd..0520cf8 100644
--- a/core/lib/Drupal/Core/Database/Install/Tasks.php
+++ b/core/lib/Drupal/Core/Database/Install/Tasks.php
@@ -184,7 +184,7 @@ protected function connect() {
    */
   protected function runTestQuery($query, $pass, $fail, $fatal = FALSE) {
     try {
-      db_query($query);
+      Database::getConnection()->query($query);
       $this->pass(t($pass));
     }
     catch (\Exception $e) {
