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;
}
}
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;
}
}
* @param string $module
* The name of the module.
*
- * @return bool
- * TRUE if configuration has been installed, FALSE otherwise.
+ * @return bool|null
+ * TRUE if configuration has been installed, FALSE otherwise. Returns NULL
+ * if the module configuration directory does not exist or does not contain
+ * any configuration files.
*/
public function assertModuleConfig($module) {
$module_config_dir = drupal_get_path('module', $module) . '/' . InstallStorage::CONFIG_INSTALL_DIRECTORY;