diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigUpgradeTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigUpgradeTest.php deleted file mode 100644 index e95f134..0000000 --- a/core/modules/config/lib/Drupal/config/Tests/ConfigUpgradeTest.php +++ /dev/null @@ -1,123 +0,0 @@ - 'Variable migration', - 'description' => 'Tests migration of variables into configuration objects.', - 'group' => 'Configuration', - ); - } - - function setUp() { - parent::setUp(); - require_once DRUPAL_ROOT . '/core/includes/update.inc'; - } - - /** - * Tests update_variables_to_config(). - */ - function testConfigurationUpdate() { - // Ensure that the variable table has the object. The variable table will - // remain in place for Drupal 8 to provide an upgrade path for overridden - // variables. - db_insert('variable') - ->fields(array('name', 'value')) - ->values(array('config_upgrade_foo', serialize($this->testContent))) - ->values(array('config_upgrade_bar', serialize($this->testContent))) - ->execute(); - - // Perform migration. - update_variables_to_config('config_upgrade.test', array( - 'config_upgrade_bar' => 'parent.bar', - 'config_upgrade_foo' => 'foo', - // A default configuration value for which no variable exists. - 'config_upgrade_baz' => 'parent.baz', - )); - - // Verify that variables have been converted and default values exist. - $config = \Drupal::config('config_upgrade.test'); - $this->assertIdentical($config->get('foo'), $this->testContent); - $this->assertIdentical($config->get('parent.bar'), $this->testContent); - $this->assertIdentical($config->get('parent.baz'), 'Baz'); - - // Verify that variables have been deleted. - $variables = db_query('SELECT name FROM {variable} WHERE name IN (:names)', array(':names' => array('config_upgrade_bar', 'config_upgrade_foo')))->fetchCol(); - $this->assertFalse($variables); - - // Add another variable to migrate into the same config object. - db_insert('variable') - ->fields(array('name', 'value')) - ->values(array('config_upgrade_additional', serialize($this->testContent))) - ->execute(); - - // Perform migration into the exsting config object. - update_variables_to_config('config_upgrade.test', array( - 'config_upgrade_additional' => 'parent.additional', - )); - - // Verify that new variables have been converted and existing still exist. - $config = \Drupal::config('config_upgrade.test'); - $this->assertIdentical($config->get('foo'), $this->testContent); - $this->assertIdentical($config->get('parent.bar'), $this->testContent); - $this->assertIdentical($config->get('parent.baz'), 'Baz'); - $this->assertIdentical($config->get('parent.additional'), $this->testContent); - - // Verify that variables have been deleted. - $variables = db_query('SELECT name FROM {variable} WHERE name IN (:names)', array(':names' => array('config_upgrade_additional')))->fetchCol(); - $this->assertFalse($variables); - - // Verify that a default module configuration file is required to exist. - try { - update_variables_to_config('config_upgrade.missing.default.config', array()); - $this->fail('Exception was not thrown on missing default module configuration file.'); - } - catch (ConfigException $e) { - $this->pass('Exception was thrown on missing default module configuration file.'); - } - - // For this test it is essential that update_variables_to_config has already - // run on the config object. - \Drupal::config('config_upgrade.test') - ->set('numeric_keys.403', '') - ->set('numeric_keys.404', '') - ->save(); - - db_insert('variable') - ->fields(array('name', 'value')) - ->values(array('config_upgrade_403', serialize('custom403'))) - ->values(array('config_upgrade_404', serialize('custom404'))) - ->execute(); - - // Perform migration. - update_variables_to_config('config_upgrade.test', array( - 'config_upgrade_403' => 'numeric_keys.403', - 'config_upgrade_404' => 'numeric_keys.404', - )); - - $this->assertIdentical(\Drupal::config('config_upgrade.test')->get('numeric_keys'), array(403 => 'custom403', 404 => 'custom404')); - } -} diff --git a/core/modules/edit/lib/Drupal/edit/Tests/EditTestBase.php b/core/modules/edit/lib/Drupal/edit/Tests/EditTestBase.php index ec309f6..b575e6b 100644 --- a/core/modules/edit/lib/Drupal/edit/Tests/EditTestBase.php +++ b/core/modules/edit/lib/Drupal/edit/Tests/EditTestBase.php @@ -27,7 +27,6 @@ class EditTestBase extends DrupalUnitTestBase { protected function setUp() { parent::setUp(); - $this->installSchema('system', 'variable'); $this->installSchema('entity_test', array('entity_test', 'entity_test_rev')); $this->installConfig(array('field', 'filter')); } diff --git a/core/modules/entity/lib/Drupal/entity/Tests/EntityDisplayTest.php b/core/modules/entity/lib/Drupal/entity/Tests/EntityDisplayTest.php index 28dc5eb..7c0dc5c 100644 --- a/core/modules/entity/lib/Drupal/entity/Tests/EntityDisplayTest.php +++ b/core/modules/entity/lib/Drupal/entity/Tests/EntityDisplayTest.php @@ -264,7 +264,6 @@ public function testBaseFieldComponent() { */ public function testRenameDeleteBundle() { $this->enableModules(array('field_test', 'node', 'system', 'text')); - $this->installSchema('system', array('variable')); $this->installSchema('node', array('node')); // Create a node bundle, display and form display object. diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceFieldTest.php b/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceFieldTest.php index 4119240..f035f37 100644 --- a/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceFieldTest.php +++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceFieldTest.php @@ -75,7 +75,6 @@ public static function getInfo() { public function setUp() { parent::setUp(); - $this->installSchema('system', 'variable'); $this->installSchema('entity_test', array('entity_test_rev', 'entity_test_rev_revision')); // Setup a field and instance. diff --git a/core/modules/field/lib/Drupal/field/Tests/FieldUnitTestBase.php b/core/modules/field/lib/Drupal/field/Tests/FieldUnitTestBase.php index f90d5f1..4f83cc5 100644 --- a/core/modules/field/lib/Drupal/field/Tests/FieldUnitTestBase.php +++ b/core/modules/field/lib/Drupal/field/Tests/FieldUnitTestBase.php @@ -36,7 +36,7 @@ function setUp() { parent::setUp(); $this->installSchema('entity_test', 'entity_test'); - $this->installSchema('system', array('sequences', 'variable', 'config_snapshot')); + $this->installSchema('system', array('sequences', 'config_snapshot')); $this->installSchema('user', array('users', 'users_roles')); // Set default storage backend and configure the theme system. diff --git a/core/modules/hal/lib/Drupal/hal/Tests/NormalizerTestBase.php b/core/modules/hal/lib/Drupal/hal/Tests/NormalizerTestBase.php index 596eb5c..3b2372c 100644 --- a/core/modules/hal/lib/Drupal/hal/Tests/NormalizerTestBase.php +++ b/core/modules/hal/lib/Drupal/hal/Tests/NormalizerTestBase.php @@ -58,7 +58,7 @@ */ function setUp() { parent::setUp(); - $this->installSchema('system', array('variable', 'url_alias', 'router')); + $this->installSchema('system', array('url_alias', 'router')); $this->installSchema('user', array('users')); $this->installSchema('entity_test', array('entity_test')); $this->installConfig(array('field', 'language')); diff --git a/core/modules/language/lib/Drupal/language/Tests/LanguageTestBase.php b/core/modules/language/lib/Drupal/language/Tests/LanguageTestBase.php index a1780b7..3fd2907 100644 --- a/core/modules/language/lib/Drupal/language/Tests/LanguageTestBase.php +++ b/core/modules/language/lib/Drupal/language/Tests/LanguageTestBase.php @@ -35,7 +35,6 @@ protected function setUp() { parent::setUp(); - $this->installSchema('system', array('variable')); $this->installConfig(array('language')); $this->state = $this->container->get('state'); diff --git a/core/modules/language/lib/Drupal/language/Tests/Views/LanguageTestBase.php b/core/modules/language/lib/Drupal/language/Tests/Views/LanguageTestBase.php index 3a8feed..7c53a1c 100644 --- a/core/modules/language/lib/Drupal/language/Tests/Views/LanguageTestBase.php +++ b/core/modules/language/lib/Drupal/language/Tests/Views/LanguageTestBase.php @@ -24,7 +24,6 @@ protected function setUp() { parent::setUp(); - $this->installSchema('system', 'variable'); $this->installConfig(array('language')); // Create English and another language beside English. diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityLanguageTestBase.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityLanguageTestBase.php index ee1c0d0..5f47450 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityLanguageTestBase.php +++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityLanguageTestBase.php @@ -50,7 +50,6 @@ function setUp() { $this->languageManager = $this->container->get('language_manager'); - $this->installSchema('system', 'variable'); $this->installSchema('entity_test', array( 'entity_test_mul', 'entity_test_mul_property_data', diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityQueryTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityQueryTest.php index f97a44f..b33285c 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityQueryTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityQueryTest.php @@ -58,7 +58,6 @@ public static function getInfo() { function setUp() { parent::setUp(); $this->installSchema('entity_test', array('entity_test_mulrev', 'entity_test_mulrev_revision', 'entity_test_mulrev_property_data', 'entity_test_mulrev_property_revision')); - $this->installSchema('system', array('variable')); $this->installConfig(array('language')); $figures = drupal_strtolower($this->randomName()); diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityUriTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityUriTest.php index 381d8b0..f548360 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityUriTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityUriTest.php @@ -22,7 +22,7 @@ public static function getInfo() { public function setUp() { parent::setUp(); - $this->installSchema('system', array('variable', 'url_alias')); + $this->installSchema('system', array('url_alias')); } /** diff --git a/core/modules/system/tests/modules/config_upgrade/config/config_upgrade.test.yml b/core/modules/system/tests/modules/config_upgrade/config/config_upgrade.test.yml deleted file mode 100644 index fc448c1..0000000 --- a/core/modules/system/tests/modules/config_upgrade/config/config_upgrade.test.yml +++ /dev/null @@ -1,7 +0,0 @@ -parent: - bar: Bar - baz: Baz -foo: Foo -numeric_keys: - 403: '' - 404: '' diff --git a/core/modules/system/tests/modules/config_upgrade/config_upgrade.info.yml b/core/modules/system/tests/modules/config_upgrade/config_upgrade.info.yml deleted file mode 100644 index b439c46..0000000 --- a/core/modules/system/tests/modules/config_upgrade/config_upgrade.info.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: 'Config upgrade tests' -type: module -description: 'A support module for update_variables_to_config testing.' -core: 8.x -package: Testing -version: VERSION -hidden: true diff --git a/core/modules/system/tests/modules/config_upgrade/config_upgrade.module b/core/modules/system/tests/modules/config_upgrade/config_upgrade.module deleted file mode 100644 index 461e96e..0000000 --- a/core/modules/system/tests/modules/config_upgrade/config_upgrade.module +++ /dev/null @@ -1,6 +0,0 @@ -installSchema('system', array('menu_router', 'variable', 'key_value_expire')); + $this->installSchema('system', array('menu_router', 'key_value_expire')); } diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/FilterBooleanOperatorTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/FilterBooleanOperatorTest.php index 77841f3..1ef7ca8 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Handler/FilterBooleanOperatorTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Handler/FilterBooleanOperatorTest.php @@ -45,7 +45,7 @@ public static function getInfo() { protected function setUp() { parent::setUp(); - $this->installSchema('system', array('menu_router', 'variable', 'key_value_expire')); + $this->installSchema('system', array('menu_router', 'key_value_expire')); } /** diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/FilterEqualityTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/FilterEqualityTest.php index 9b74533..0c0c517 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Handler/FilterEqualityTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Handler/FilterEqualityTest.php @@ -38,7 +38,7 @@ public static function getInfo() { protected function setUp() { parent::setUp(); - $this->installSchema('system', array('menu_router', 'variable', 'key_value_expire')); + $this->installSchema('system', array('menu_router', 'key_value_expire')); } function viewsData() { diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/FilterInOperatorTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/FilterInOperatorTest.php index 0c1f32a..bd024e2 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Handler/FilterInOperatorTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Handler/FilterInOperatorTest.php @@ -39,7 +39,7 @@ public static function getInfo() { protected function setUp() { parent::setUp(); - $this->installSchema('system', array('menu_router', 'variable', 'key_value_expire')); + $this->installSchema('system', array('menu_router', 'key_value_expire')); } function viewsData() { diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/FilterNumericTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/FilterNumericTest.php index a1f50ef..ad0a627 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Handler/FilterNumericTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Handler/FilterNumericTest.php @@ -39,7 +39,7 @@ public static function getInfo() { protected function setUp() { parent::setUp(); - $this->installSchema('system', array('menu_router', 'variable', 'key_value_expire')); + $this->installSchema('system', array('menu_router', 'key_value_expire')); } function viewsData() { diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/FilterStringTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/FilterStringTest.php index f00eaf3..5a62bed 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Handler/FilterStringTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Handler/FilterStringTest.php @@ -38,7 +38,7 @@ public static function getInfo() { protected function setUp() { parent::setUp(); - $this->installSchema('system', array('menu_router', 'variable', 'key_value_expire')); + $this->installSchema('system', array('menu_router', 'key_value_expire')); } function viewsData() { diff --git a/core/modules/views/lib/Drupal/views/Tests/Wizard/WizardPluginBaseUnitTest.php b/core/modules/views/lib/Drupal/views/Tests/Wizard/WizardPluginBaseUnitTest.php index 8d2fad6..b654289 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Wizard/WizardPluginBaseUnitTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Wizard/WizardPluginBaseUnitTest.php @@ -43,7 +43,6 @@ public static function getInfo() { protected function setUp() { parent::setUp(); - $this->installSchema('system', 'variable'); $this->installConfig(array('language')); $this->enableModules(array('views_ui'));