Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / system / src / Tests / Module / ModuleTestBase.php
index cc5a7ef2706fe06d54498aea0267a93617d5bea3..257bb879cf77000bfc8d03ae0fb2e10291daf5d5 100644 (file)
@@ -59,8 +59,9 @@ abstract class ModuleTestBase extends WebTestBase {
   public function assertModuleTablesExist($module) {
     $tables = array_keys(drupal_get_module_schema($module));
     $tables_exist = TRUE;
+    $schema = Database::getConnection()->schema();
     foreach ($tables as $table) {
-      if (!db_table_exists($table)) {
+      if (!$schema->tableExists($table)) {
         $tables_exist = FALSE;
       }
     }
@@ -76,8 +77,9 @@ abstract class ModuleTestBase extends WebTestBase {
   public function assertModuleTablesDoNotExist($module) {
     $tables = array_keys(drupal_get_module_schema($module));
     $tables_exist = FALSE;
+    $schema = Database::getConnection()->schema();
     foreach ($tables as $table) {
-      if (db_table_exists($table)) {
+      if ($schema->tableExists($table)) {
         $tables_exist = TRUE;
       }
     }