diff --git a/core/lib/Drupal/Core/Config/DatabaseStorage.php b/core/lib/Drupal/Core/Config/DatabaseStorage.php index 70096a0..b017e9b 100644 --- a/core/lib/Drupal/Core/Config/DatabaseStorage.php +++ b/core/lib/Drupal/Core/Config/DatabaseStorage.php @@ -186,7 +186,7 @@ protected function ensureTableExists() { /** * Defines the schema for the configuration table. */ - protected static function schemaDefinition() { + public static function schemaDefinition() { $schema = array( 'description' => 'The base table for configuration data.', 'fields' => array( diff --git a/core/lib/Drupal/Core/KeyValueStore/DatabaseStorage.php b/core/lib/Drupal/Core/KeyValueStore/DatabaseStorage.php index 5efd320..3d2575b 100644 --- a/core/lib/Drupal/Core/KeyValueStore/DatabaseStorage.php +++ b/core/lib/Drupal/Core/KeyValueStore/DatabaseStorage.php @@ -273,7 +273,7 @@ protected function catchException(\Exception $e) { /** * Defines the schema for the batch table. */ - public function schemaDefinition() { + public static function schemaDefinition() { return [ 'description' => 'Generic key-value storage table. See the state system for an example.', 'fields' => [ diff --git a/core/modules/field/src/Tests/FieldUnitTestBase.php b/core/modules/field/src/Tests/FieldUnitTestBase.php index ddcf3f9..daf036c 100644 --- a/core/modules/field/src/Tests/FieldUnitTestBase.php +++ b/core/modules/field/src/Tests/FieldUnitTestBase.php @@ -50,7 +50,7 @@ protected function setUp() { $this->installEntitySchema('entity_test'); $this->installEntitySchema('user'); - $this->installSchema('system', ['router', 'sequences', 'key_value']); + $this->installSchema('system', ['router', 'sequences']); // Set default storage backend and configure the theme system. $this->installConfig(array('field', 'system')); diff --git a/core/modules/system/src/Tests/Entity/EntityAutocompleteTest.php b/core/modules/system/src/Tests/Entity/EntityAutocompleteTest.php index d42a07a..ebd970e 100644 --- a/core/modules/system/src/Tests/Entity/EntityAutocompleteTest.php +++ b/core/modules/system/src/Tests/Entity/EntityAutocompleteTest.php @@ -38,14 +38,6 @@ class EntityAutocompleteTest extends EntityUnitTestBase { protected $bundle = 'entity_test'; /** - * {@inheritdoc} - */ - protected function setUp() { - parent::setUp(); - $this->installSchema('system', ['key_value']); - } - - /** * Tests autocompletion edge cases with slashes in the names. */ function testEntityReferenceAutocompletion() { diff --git a/core/modules/system/src/Tests/KeyValueStore/DatabaseStorageTest.php b/core/modules/system/src/Tests/KeyValueStore/DatabaseStorageTest.php index dd9e44c..598a1eb 100644 --- a/core/modules/system/src/Tests/KeyValueStore/DatabaseStorageTest.php +++ b/core/modules/system/src/Tests/KeyValueStore/DatabaseStorageTest.php @@ -24,11 +24,6 @@ class DatabaseStorageTest extends StorageTestBase { */ public static $modules = array('system'); - protected function setUp() { - parent::setUp(); - $this->installSchema('system', array('key_value')); - } - /** * {@inheritdoc} */ diff --git a/core/modules/system/src/Tests/Path/UrlAliasFixtures.php b/core/modules/system/src/Tests/Path/UrlAliasFixtures.php index 92438aa..4b8f2d7 100644 --- a/core/modules/system/src/Tests/Path/UrlAliasFixtures.php +++ b/core/modules/system/src/Tests/Path/UrlAliasFixtures.php @@ -7,6 +7,7 @@ namespace Drupal\system\Tests\Path; +use Drupal\Core\Config\DatabaseStorage; use Drupal\Core\Database\Connection; /** @@ -93,7 +94,8 @@ public function tableDefinition() { $schema = system_schema(); $tables['url_alias'] = $schema['url_alias']; - $tables['key_value'] = $schema['key_value']; + + $tables['key_value'] = DatabaseStorage::schemaDefinition(); return $tables; }