From 68eecef413fed33cfdac787c66309e4bb511b722 Mon Sep 17 00:00:00 2001 From: catch Date: Sat, 7 Apr 2012 11:28:53 +0900 Subject: [PATCH] Issue #1497132 by alexpott, pcambra, marcingy: follow-up for generalised function to update variables from Drupal 7 to Drupal 8's configuration management system. --- core/includes/update.inc | 12 ++++++------ core/modules/config/config.test | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/core/includes/update.inc b/core/includes/update.inc index 1660d7dbb6..7a4a27d194 100644 --- a/core/includes/update.inc +++ b/core/includes/update.inc @@ -851,23 +851,23 @@ function update_retrieve_dependencies() { /** * Updates config with values set on Drupal 7.x - * + * * Provide a generalised method to migrate variables from Drupal 7 to Drupal 8's * configuration management system. * * @param $config_name * The name of the configuration object to retrieve. The name corresponds to - * an XML configuration file. For @code config(book.admin) @endcode, the - * config object returned will contain the contents of book.admin.xml. + * an XML configuration file. For example, passing "book.admin" will return + * the config object containing the contents of book.admin.xml. * @param $variable_map * An array to map new to old configuration naming conventions. Example: * @code * array('new_config' => 'old_config') - * @endcode - * This would update the value for new_config to the value old_config has in + * @endcode + * This would update the value for new_config to the value old_config has in * the variable table. */ -function update_variables_to_config($config_name, $variable_map = array()) { +function update_variables_to_config($config_name, array $variable_map = array()) { $config = config($config_name); $config_data = array_keys($config->get()); diff --git a/core/modules/config/config.test b/core/modules/config/config.test index 34f536aa83..a164108c3d 100644 --- a/core/modules/config/config.test +++ b/core/modules/config/config.test @@ -306,7 +306,7 @@ class ConfUpdate7to8TestCase extends DrupalWebTestCase { public static function getInfo() { return array( 'name' => 'Configuration update from Drupal 7 to 8', - 'description' => 'Tests the ability to update Drupal 7 variables to the + 'description' => 'Tests the ability to update Drupal 7 variables to the configuration management system.', 'group' => 'Configuration', ); @@ -329,7 +329,7 @@ class ConfUpdate7to8TestCase extends DrupalWebTestCase { update_variables_to_config('config.test', array('config_test_bar' => 'config_bar')); $config = config('config.test'); - $this->assertEqual($config->get('config_test_foo'), $this->testContent); - $this->assertEqual($config->get('config_test_bar'), $this->testContent); + $this->assertEqual($config->get('config_test_foo'), $this->testContent); + $this->assertEqual($config->get('config_test_bar'), $this->testContent); } } -- GitLab