Skip to content
Snippets Groups Projects
Commit 255d9883 authored by catch's avatar catch
Browse files

Issue #1045786 by Désiré, droplet: Fixed Length of Trimmed Description.

parent 5f46023c
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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.")
);
......
......@@ -278,6 +278,37 @@ 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'));
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(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment