diff options
author | webchick <webchick@24967.no-reply.drupal.org> | 2012-01-31 00:07:27 -0800 |
---|---|---|
committer | webchick <webchick@24967.no-reply.drupal.org> | 2012-01-31 00:07:27 -0800 |
commit | 4bfd0a68b63bc014889e8eadd0563d96d77e23b9 (patch) | |
tree | 5a8f340c46cf78ab1185398dbea109049da8fc74 /modules/aggregator | |
parent | 9f1ec4fb60c5093b98d06c3a6a3a95233fc4b8ea (diff) | |
download | brdo-4bfd0a68b63bc014889e8eadd0563d96d77e23b9.tar.gz brdo-4bfd0a68b63bc014889e8eadd0563d96d77e23b9.tar.bz2 |
Issue #1045786 by Désiré, Albert Volkman, droplet: Fixed Length of Aggregator Trimmed Description.
Diffstat (limited to 'modules/aggregator')
-rw-r--r-- | modules/aggregator/aggregator.processor.inc | 2 | ||||
-rw-r--r-- | modules/aggregator/aggregator.test | 32 |
2 files changed, 33 insertions, 1 deletions
diff --git a/modules/aggregator/aggregator.processor.inc b/modules/aggregator/aggregator.processor.inc index 5464d66e1..7fa86a9ad 100644 --- a/modules/aggregator/aggregator.processor.inc +++ b/modules/aggregator/aggregator.processor.inc @@ -117,7 +117,7 @@ function aggregator_form_aggregator_admin_form_alter(&$form, $form_state) { $form['modules']['aggregator']['aggregator_teaser_length'] = array( '#type' => 'select', '#title' => t('Length of trimmed description'), - '#default_value' => 600, + '#default_value' => variable_get('aggregator_teaser_length', 600), '#options' => drupal_map_assoc(array(0, 200, 400, 600, 800, 1000, 1200, 1400, 1600, 1800, 2000), '_aggregator_characters'), '#description' => t("The maximum number of characters used in the trimmed version of content.") ); diff --git a/modules/aggregator/aggregator.test b/modules/aggregator/aggregator.test index 0d1e31ba5..b224b7938 100644 --- a/modules/aggregator/aggregator.test +++ b/modules/aggregator/aggregator.test @@ -284,6 +284,38 @@ EOF; } } +/** + * Tests aggregator configuration settings. + */ +class AggregatorConfigurationTestCase extends AggregatorTestCase { + public static function getInfo() { + return array( + 'name' => 'Aggregator configuration', + 'description' => 'Test aggregator settings page.', + 'group' => 'Aggregator', + ); + } + + /** + * Tests the settings form to ensure the correct default values are used. + */ + function testSettingsPage() { + $edit = array( + 'aggregator_allowed_html_tags' => '<a>', + 'aggregator_summary_items' => 10, + 'aggregator_clear' => 3600, + 'aggregator_category_selector' => 'select', + 'aggregator_teaser_length' => 200, + ); + $this->drupalPost('admin/config/services/aggregator/settings', $edit, t('Save configuration')); + $this->assertText(t('The configuration options have been saved.')); + + foreach ($edit as $name => $value) { + $this->assertFieldByName($name, $value, t('"@name" has correct default value.', array('@name' => $name))); + } + } +} + class AddFeedTestCase extends AggregatorTestCase { public static function getInfo() { return array( |