diff --git a/core/includes/schema.inc b/core/includes/schema.inc index 7824c7a..b3880e9 100644 --- a/core/includes/schema.inc +++ b/core/includes/schema.inc @@ -5,7 +5,6 @@ * Schema API handling functions. */ -use Drupal\Core\Cache\Cache; use Drupal\Core\Database\Database; /** diff --git a/core/modules/simpletest/src/Tests/KernelTestBaseTest.php b/core/modules/simpletest/src/Tests/KernelTestBaseTest.php index c34a1a7..5a04505 100644 --- a/core/modules/simpletest/src/Tests/KernelTestBaseTest.php +++ b/core/modules/simpletest/src/Tests/KernelTestBaseTest.php @@ -108,7 +108,7 @@ function testEnableModulesInstall() { $this->assertFalse(in_array($module, $list), "{$module}_hook_info() in \Drupal::moduleHandler()->getImplementations() not found."); $this->assertFalse(db_table_exists($table), "'$table' database table not found."); - $schema = drupal_get_schema_unprocessed($table, TRUE); + $schema = drupal_get_schema_unprocessed($module, $table); $this->assertFalse($schema, "'$table' table schema not found."); // Install the module. @@ -122,7 +122,7 @@ function testEnableModulesInstall() { $this->assertTrue(in_array($module, $list), "{$module}_hook_info() in \Drupal::moduleHandler()->getImplementations() found."); $this->assertTrue(db_table_exists($table), "'$table' database table found."); - $schema = drupal_get_schema_unprocessed($table); + $schema = drupal_get_schema_unprocessed($module, $table); $this->assertTrue($schema, "'$table' table schema found."); } @@ -154,7 +154,7 @@ function testInstallSchema() { $this->assertTrue(db_table_exists($table), "'$table' database table found."); // Verify that the schema is known to Schema API. - $schema = drupal_get_schema_unprocessed($table); + $schema = drupal_get_schema_unprocessed($module, $table); $this->assertTrue($schema, "'$table' table schema found."); // Verify that a unknown table from an enabled module throws an error. @@ -167,7 +167,7 @@ function testInstallSchema() { $this->pass('Exception for non-retrievable schema found.'); } $this->assertFalse(db_table_exists($table), "'$table' database table not found."); - $schema = drupal_get_schema_unprocessed($table); + $schema = drupal_get_schema_unprocessed($module, $table); $this->assertFalse($schema, "'$table' table schema not found."); // Verify that a table from a unknown module cannot be installed. @@ -181,14 +181,14 @@ function testInstallSchema() { $this->pass('Exception for non-retrievable schema found.'); } $this->assertFalse(db_table_exists($table), "'$table' database table not found."); - $schema = drupal_get_schema_unprocessed($table); + $schema = drupal_get_schema_unprocessed($module, $table); $this->assertFalse($schema, "'$table' table schema not found."); // Verify that the same table can be installed after enabling the module. $this->enableModules(array($module)); $this->installSchema($module, $table); $this->assertTrue(db_table_exists($table), "'$table' database table found."); - $schema = drupal_get_schema_unprocessed($table); + $schema = drupal_get_schema_unprocessed($module, $table); $this->assertTrue($schema, "'$table' table schema found."); } diff --git a/core/modules/system/src/Tests/Database/InsertDefaultsTest.php b/core/modules/system/src/Tests/Database/InsertDefaultsTest.php index 831002d..88bc853 100644 --- a/core/modules/system/src/Tests/Database/InsertDefaultsTest.php +++ b/core/modules/system/src/Tests/Database/InsertDefaultsTest.php @@ -23,7 +23,7 @@ function testDefaultInsert() { $query = db_insert('test')->useDefaults(array('job')); $id = $query->execute(); - $schema = drupal_get_schema_unprocessed('test'); + $schema = drupal_get_schema_unprocessed('database_test', 'test'); $job = db_query('SELECT job FROM {test} WHERE id = :id', array(':id' => $id))->fetchField(); $this->assertEqual($job, $schema['fields']['job']['default'], 'Default field value is set.'); @@ -56,7 +56,7 @@ function testDefaultInsertWithFields() { ->useDefaults(array('job')); $id = $query->execute(); - $schema = drupal_get_schema_unprocessed('test'); + $schema = drupal_get_schema_unprocessed('database_test', 'test'); $job = db_query('SELECT job FROM {test} WHERE id = :id', array(':id' => $id))->fetchField(); $this->assertEqual($job, $schema['fields']['job']['default'], 'Default field value is set.'); diff --git a/core/modules/system/tests/modules/module_test/module_test.install b/core/modules/system/tests/modules/module_test/module_test.install index 63a559f..0d4dc8b 100644 --- a/core/modules/system/tests/modules/module_test/module_test.install +++ b/core/modules/system/tests/modules/module_test/module_test.install @@ -28,7 +28,7 @@ function module_test_schema() { * Implements hook_install(). */ function module_test_install() { - $schema = drupal_get_schema_unprocessed('module_test'); + $schema = drupal_get_schema_unprocessed('module_test', 'module_test'); db_insert('module_test') ->fields(array( 'data' => $schema['fields']['data']['type'],