From 6a27d1b0ebe0970517df30f032e4b4c3acc2442a Mon Sep 17 00:00:00 2001 From: catch Date: Wed, 3 Apr 2013 12:21:35 +0100 Subject: [PATCH] Issue #1958702 by rootatwc: Fixed Aggregator variables to config update is never executed. --- core/modules/aggregator/aggregator.install | 2 +- .../Tests/Upgrade/SystemUpgradePathTest.php | 10 +++++++ .../upgrade/drupal-7.system.database.php | 28 +++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/core/modules/aggregator/aggregator.install b/core/modules/aggregator/aggregator.install index 54f905300ce..11447ee26b6 100644 --- a/core/modules/aggregator/aggregator.install +++ b/core/modules/aggregator/aggregator.install @@ -295,7 +295,7 @@ function aggregator_schema() { * * @ingroup config_upgrade */ -function aggregrator_update_8000() { +function aggregator_update_8000() { update_variables_to_config('aggregator.settings', array( 'aggregator_fetcher' => 'fetcher', 'aggregator_parser' => 'parser', diff --git a/core/modules/system/lib/Drupal/system/Tests/Upgrade/SystemUpgradePathTest.php b/core/modules/system/lib/Drupal/system/Tests/Upgrade/SystemUpgradePathTest.php index 471e2d8d562..5d35e32d613 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Upgrade/SystemUpgradePathTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Upgrade/SystemUpgradePathTest.php @@ -159,6 +159,16 @@ class SystemUpgradePathTest extends UpgradePathTestBase { 'child_type' => 'book', ); + $expected_config['aggregator.settings'] = array( + 'fetcher' => 'test_fetcher', + 'parser' => 'test_parser', + 'processors' => array('test_processor'), + 'items.allowed_html' => '', + 'items.teaser_length' => 6000, + 'items.expire' => 10, + 'source.list_max' => 5, + ); + foreach ($expected_config as $file => $values) { $config = config($file); $this->verbose(print_r($config->get(), TRUE)); diff --git a/core/modules/system/tests/upgrade/drupal-7.system.database.php b/core/modules/system/tests/upgrade/drupal-7.system.database.php index e8502cc0c6a..beebe4eba52 100644 --- a/core/modules/system/tests/upgrade/drupal-7.system.database.php +++ b/core/modules/system/tests/upgrade/drupal-7.system.database.php @@ -135,6 +135,34 @@ db_insert('variable')->fields(array( 'name' => 'fast_404_html', 'value' => 's:168:"Page Not Found

Page Not Found

The requested URL "@path" was not found on this server.

";', )) + ->values(array( + 'name' => 'aggregator_fetcher', + 'value' => 's:12:"test_fetcher";', + )) + ->values(array( + 'name' => 'aggregator_parser', + 'value' => 's:11:"test_parser";', + )) + ->values(array( + 'name' => 'aggregator_processors', + 'value' => 'a:1:{i:0;s:14:"test_processor";}', + )) + ->values(array( + 'name' => 'aggregator_allowed_html_tags', + 'value' => 's:3:"
";', + )) + ->values(array( + 'name' => 'aggregator_teaser_length', + 'value' => 'i:6000;', + )) + ->values(array( + 'name' => 'aggregator_clear', + 'value' => 'i:10;', + )) + ->values(array( + 'name' => 'aggregator_summary_items', + 'value' => 'i:5;', + )) ->execute(); db_update('variable')