diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigInstallWebTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigInstallWebTest.php index 776daa4..a3be696 100644 --- a/core/modules/config/lib/Drupal/config/Tests/ConfigInstallWebTest.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigInstallWebTest.php @@ -137,14 +137,14 @@ function testInstallProfileConfigOverwrite() { // Turn on the test module, which will attempt to replace the // configuration data. This attempt to replace the active configuration // should be ignored. - \Drupal::moduleHandler()->install(array('config_override_test')); + \Drupal::moduleHandler()->install(array('config_existing_default_config_test')); // Verify that the test module has not been able to change the data. $config = \Drupal::config($config_name); $this->assertIdentical($config->get(), $expected_profile_data); // Disable and uninstall the test module. - \Drupal::moduleHandler()->uninstall(array('config_override_test')); + \Drupal::moduleHandler()->uninstall(array('config_existing_default_config_test')); // Verify that the data hasn't been altered by removing the test module. $config = \Drupal::config($config_name); diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigModuleOverridesTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigModuleOverridesTest.php index c5c7190..1c358c5 100644 --- a/core/modules/config/lib/Drupal/config/Tests/ConfigModuleOverridesTest.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigModuleOverridesTest.php @@ -14,7 +14,7 @@ */ class ConfigModuleOverridesTest extends DrupalUnitTestBase { - public static $modules = array('system', 'config', 'config_override'); + public static $modules = array('system', 'config', 'config_override_test'); public static function getInfo() { return array( @@ -55,11 +55,11 @@ public function testSimpleModuleOverrides() { // Test overrides of completely new configuration objects. In normal runtime // this should only happen for configuration entities as we should not be // creating simple configuration objects on the fly. - $config = $config_factory->get('config_override.new'); - $this->assertTrue($config->isNew(), 'The configuration object config_override.new is new'); + $config = $config_factory->get('config_override_test.new'); + $this->assertTrue($config->isNew(), 'The configuration object config_override_test.new is new'); $this->assertIdentical($config->get('module'), 'override'); $config_factory->setOverrideState(FALSE); - $config = \Drupal::config('config_override.new'); + $config = \Drupal::config('config_override_test.new'); $this->assertIdentical($config->get('module'), NULL); $config_factory->setOverrideState($old_state); diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigOtherModuleTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigOtherModuleTest.php index 9ba92da..c819cb6 100644 --- a/core/modules/config/lib/Drupal/config/Tests/ConfigOtherModuleTest.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigOtherModuleTest.php @@ -39,29 +39,29 @@ public function setUp() { * Tests enabling the provider of the default configuration first. */ public function testInstallOtherModuleFirst() { - $this->moduleHandler->install(array('config_other_module_config')); + $this->moduleHandler->install(array('config_other_module_config_test')); // Check that the config entity doesn't exist before the config_test module // is enabled. We cannot use the entity system because the config_test // entity type does not exist. - $config = $this->container->get('config.factory')->get('config_test.dynamic.other_module'); + $config = $this->container->get('config.factory')->get('config_test.dynamic.other_module_test'); $this->assertTrue($config->isNew(), 'Default configuration for other modules is not installed if that module is not enabled.'); // Install the module that provides the entity type. This installs the // default configuration. $this->moduleHandler->install(array('config_test')); - $this->assertTrue(entity_load('config_test', 'other_module', TRUE), 'Default configuration has been installed.'); + $this->assertTrue(entity_load('config_test', 'other_module_test', TRUE), 'Default configuration has been installed.'); // Uninstall the module that provides the entity type. This will remove the // default configuration. $this->moduleHandler->uninstall(array('config_test')); - $config = $this->container->get('config.factory')->get('config_test.dynamic.other_module'); + $config = $this->container->get('config.factory')->get('config_test.dynamic.other_module_test'); $this->assertTrue($config->isNew(), 'Default configuration for other modules is removed when the config entity provider is disabled.'); // Install the module that provides the entity type again. This installs the // default configuration. $this->moduleHandler->install(array('config_test')); - $other_module_config_entity = entity_load('config_test', 'other_module', TRUE); + $other_module_config_entity = entity_load('config_test', 'other_module_test', TRUE); $this->assertTrue($other_module_config_entity, "Default configuration has been recreated."); // Update the default configuration to test that the changes are preserved @@ -70,15 +70,15 @@ public function testInstallOtherModuleFirst() { $other_module_config_entity->save(); // Uninstall the module that provides the default configuration. - $this->moduleHandler->uninstall(array('config_other_module_config')); - $this->assertTrue(entity_load('config_test', 'other_module', TRUE), 'Default configuration for other modules is not removed when the module that provides it is uninstalled.'); + $this->moduleHandler->uninstall(array('config_other_module_config_test')); + $this->assertTrue(entity_load('config_test', 'other_module_test', TRUE), 'Default configuration for other modules is not removed when the module that provides it is uninstalled.'); // Default configuration provided by config_test should still exist. $this->assertTrue(entity_load('config_test', 'dotted.default', TRUE), 'The configuration is not deleted.'); // Re-enable module to test that default config is unchanged. - $this->moduleHandler->install(array('config_other_module_config')); - $config_entity = entity_load('config_test', 'other_module', TRUE); + $this->moduleHandler->install(array('config_other_module_config_test')); + $config_entity = entity_load('config_test', 'other_module_test', TRUE); $this->assertEqual($config_entity->get('style'), "The piano ain't got no wrong notes.", 'Re-enabling the module does not install default config over the existing config entity.'); } @@ -87,10 +87,10 @@ public function testInstallOtherModuleFirst() { */ public function testInstallConfigEnityModuleFirst() { $this->moduleHandler->install(array('config_test')); - $this->assertFalse(entity_load('config_test', 'other_module', TRUE), 'Default configuration provided by config_other_module_config does not exist.'); + $this->assertFalse(entity_load('config_test', 'other_module_test', TRUE), 'Default configuration provided by config_other_module_config_test does not exist.'); - $this->moduleHandler->install(array('config_other_module_config')); - $this->assertTrue(entity_load('config_test', 'other_module', TRUE), 'Default configuration provided by config_other_module_config has been installed.'); + $this->moduleHandler->install(array('config_other_module_config_test')); + $this->assertTrue(entity_load('config_test', 'other_module_test', TRUE), 'Default configuration provided by config_other_module_config_test has been installed.'); } /** diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigOverridesPriorityTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigOverridesPriorityTest.php index 6deab96..44a4180 100644 --- a/core/modules/config/lib/Drupal/config/Tests/ConfigOverridesPriorityTest.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigOverridesPriorityTest.php @@ -15,7 +15,7 @@ */ class ConfigOverridesPriorityTest extends DrupalUnitTestBase { - public static $modules = array('system', 'config', 'config_override', 'language'); + public static $modules = array('system', 'config', 'config_override_test', 'language'); public static function getInfo() { return array( diff --git a/core/modules/config/tests/config_existing_default_config_test/config/install/system.cron.yml b/core/modules/config/tests/config_existing_default_config_test/config/install/system.cron.yml new file mode 100644 index 0000000..79f797f --- /dev/null +++ b/core/modules/config/tests/config_existing_default_config_test/config/install/system.cron.yml @@ -0,0 +1,5 @@ +threshold: + autorun: 0 + requirements_warning: 172800 + requirements_error: 1209600 + diff --git a/core/modules/config/tests/config_override_test/config_override_test.yml b/core/modules/config/tests/config_existing_default_config_test/config_existing_default_config_test.yml similarity index 52% rename from core/modules/config/tests/config_override_test/config_override_test.yml rename to core/modules/config/tests/config_existing_default_config_test/config_existing_default_config_test.yml index f1f1109..75436be 100644 --- a/core/modules/config/tests/config_override_test/config_override_test.yml +++ b/core/modules/config/tests/config_existing_default_config_test/config_existing_default_config_test.yml @@ -1,4 +1,4 @@ -name: 'Configuration override test' +name: 'Configuration existing default config test' type: module package: Testing version: VERSION diff --git a/core/modules/config/tests/config_other_module_config/config/install/config_test.dynamic.other_module.yml b/core/modules/config/tests/config_other_module_config_test/config/install/config_test.dynamic.other_module_test.yml similarity index 60% rename from core/modules/config/tests/config_other_module_config/config/install/config_test.dynamic.other_module.yml rename to core/modules/config/tests/config_other_module_config_test/config/install/config_test.dynamic.other_module_test.yml index b56ac6d..a43f3a0 100644 --- a/core/modules/config/tests/config_other_module_config/config/install/config_test.dynamic.other_module.yml +++ b/core/modules/config/tests/config_other_module_config_test/config/install/config_test.dynamic.other_module_test.yml @@ -1,5 +1,5 @@ -id: other_module -label: 'Other module' +id: other_module_test +label: 'Other module test' weight: 0 style: '' status: true diff --git a/core/modules/config/tests/config_other_module_config/config_other_module_config.info.yml b/core/modules/config/tests/config_other_module_config_test/config_other_module_config_test.info.yml similarity index 100% rename from core/modules/config/tests/config_other_module_config/config_other_module_config.info.yml rename to core/modules/config/tests/config_other_module_config_test/config_other_module_config_test.info.yml diff --git a/core/modules/config/tests/config_override/config_override.services.yml b/core/modules/config/tests/config_override/config_override.services.yml deleted file mode 100644 index 5272a84..0000000 --- a/core/modules/config/tests/config_override/config_override.services.yml +++ /dev/null @@ -1,9 +0,0 @@ -services: - config_override.overrider: - class: Drupal\config_override\ConfigOverrider - tags: - - { name: config.factory.override} - config_override.low_priority_overrider: - class: Drupal\config_override\ConfigOverriderLowPriority - tags: - - { name: config.factory.override, priority: -100 } diff --git a/core/modules/config/tests/config_override/config_override.info.yml b/core/modules/config/tests/config_override_test/config_override_test.info.yml similarity index 100% rename from core/modules/config/tests/config_override/config_override.info.yml rename to core/modules/config/tests/config_override_test/config_override_test.info.yml diff --git a/core/modules/config/tests/config_override_test/config_override_test.module b/core/modules/config/tests/config_override_test/config_override_test.module deleted file mode 100644 index f364ffb..0000000 --- a/core/modules/config/tests/config_override_test/config_override_test.module +++ /dev/null @@ -1,6 +0,0 @@ - array('name' => 'ZOMG overridden site name')); } - if (in_array('config_override.new', $names)) { - $overrides = $overrides + array('config_override.new' => array('module' => 'override')); + if (in_array('config_override_test.new', $names)) { + $overrides = $overrides + array('config_override_test.new' => array('module' => 'override')); } } return $overrides; diff --git a/core/modules/config/tests/config_override/lib/Drupal/config_override/ConfigOverriderLowPriority.php b/core/modules/config/tests/config_override_test/lib/Drupal/config_override_test/ConfigOverriderLowPriority.php similarity index 89% rename from core/modules/config/tests/config_override/lib/Drupal/config_override/ConfigOverriderLowPriority.php rename to core/modules/config/tests/config_override_test/lib/Drupal/config_override_test/ConfigOverriderLowPriority.php index a9a435e..b1dd32d 100644 --- a/core/modules/config/tests/config_override/lib/Drupal/config_override/ConfigOverriderLowPriority.php +++ b/core/modules/config/tests/config_override_test/lib/Drupal/config_override_test/ConfigOverriderLowPriority.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\config_override\ConfigOverriderLowPriority. + * Contains \Drupal\config_override_test\ConfigOverriderLowPriority. */ -namespace Drupal\config_override; +namespace Drupal\config_override_test; use Drupal\Core\Config\ConfigFactoryOverrideInterface; diff --git a/core/modules/config/tests/config_schema_test/config_schema_test.info.yml b/core/modules/config/tests/config_schema_test/config_schema_test.info.yml index 9836e8b..e60f480 100644 --- a/core/modules/config/tests/config_schema_test/config_schema_test.info.yml +++ b/core/modules/config/tests/config_schema_test/config_schema_test.info.yml @@ -3,4 +3,3 @@ type: module package: Testing version: VERSION core: 8.x -hidden: true diff --git a/core/modules/config/tests/config_test_invalid_name/config/install/invalid_object_name.yml b/core/modules/config/tests/config_test_invalid_name/config/install/invalid_object_name.yml deleted file mode 100644 index f3f2ba0..0000000 --- a/core/modules/config/tests/config_test_invalid_name/config/install/invalid_object_name.yml +++ /dev/null @@ -1 +0,0 @@ -frittata: potato diff --git a/core/modules/config/tests/config_test_invalid_name/config/schema/config_test_invalid_name.schema.yml b/core/modules/config/tests/config_test_invalid_name/config/schema/config_test_invalid_name.schema.yml deleted file mode 100644 index 1f541b1..0000000 --- a/core/modules/config/tests/config_test_invalid_name/config/schema/config_test_invalid_name.schema.yml +++ /dev/null @@ -1,9 +0,0 @@ -# Schema for the configuration files of the Invalid Configuration Name module. - -invalid_object_name: - type: mapping - label: 'Invalid configuration' - mapping: - frittata: - type: string - label: 'String' diff --git a/core/modules/config/tests/config_test_invalid_name/install b/core/modules/config/tests/config_test_invalid_name/install deleted file mode 100644 index 91ed0ae..0000000 --- a/core/modules/config/tests/config_test_invalid_name/install +++ /dev/null @@ -1,5 +0,0 @@ -name: 'Invalid configuration name' -type: module -package: Core -version: VERSION -core: 8.x