diff --git a/core/lib/Drupal/Core/Config/ConfigFactory.php b/core/lib/Drupal/Core/Config/ConfigFactory.php index 953e52d..ef58636 100644 --- a/core/lib/Drupal/Core/Config/ConfigFactory.php +++ b/core/lib/Drupal/Core/Config/ConfigFactory.php @@ -277,7 +277,7 @@ protected function loadModuleOverrides(array $names) { } /** - * Get a list of configuration object names to preload. + * Gets a list of configuration object names to preload. * * @return array * An array of configuration object names to preload. diff --git a/core/tests/Drupal/Tests/Core/Config/ConfigPreloadSubscriberTest.php b/core/tests/Drupal/Tests/Core/Config/ConfigPreloadSubscriberTest.php new file mode 100644 index 0000000..2f7c04e --- /dev/null +++ b/core/tests/Drupal/Tests/Core/Config/ConfigPreloadSubscriberTest.php @@ -0,0 +1,47 @@ + 'Config preload subscriber test', + 'description' => 'Tests the config preload subscriber and settings interactions.', + 'group' => 'Configuration', + ); + } + + /** + * Tests names from settings are added to the event. + */ + public function testOnConfigPreloadNamesGetSettingsNames() { + + $config_names = array('three', 'blind', 'mice'); + $settings = new Settings(array('config_preload_names' => $config_names)); + $event = new ConfigPreloadEvent(); + + $subscriber = new ConfigPreloadSubscriber($settings); + $subscriber->onConfigPreloadNamesGetSettingsNames($event); + + $this->assertEquals($config_names, $event->getNames(), "Config names have been added to the event"); + } +}