diff options
Diffstat (limited to 'modules/aggregator')
-rw-r--r-- | modules/aggregator/aggregator.admin.inc | 28 | ||||
-rw-r--r-- | modules/aggregator/aggregator.module | 36 | ||||
-rw-r--r-- | modules/aggregator/aggregator.pages.inc | 2 | ||||
-rw-r--r-- | modules/aggregator/aggregator.test | 46 |
4 files changed, 56 insertions, 56 deletions
diff --git a/modules/aggregator/aggregator.admin.inc b/modules/aggregator/aggregator.admin.inc index 8f8d43424..bc2012c1d 100644 --- a/modules/aggregator/aggregator.admin.inc +++ b/modules/aggregator/aggregator.admin.inc @@ -27,10 +27,10 @@ function aggregator_view() { $header = array(t('Title'), t('Items'), t('Last update'), t('Next update'), array('data' => t('Operations'), 'colspan' => '3')); $rows = array(); foreach ($result as $feed) { - $rows[] = array(l($feed->title, "aggregator/sources/$feed->fid"), format_plural($feed->items, '1 item', '@count items'), ($feed->checked ? t('@time ago', array('@time' => format_interval(REQUEST_TIME - $feed->checked))) : t('never')), ($feed->checked && $feed->refresh ? t('%time left', array('%time' => format_interval($feed->checked + $feed->refresh - REQUEST_TIME))) : t('never')), l(t('edit'), "admin/content/aggregator/edit/feed/$feed->fid"), l(t('remove items'), "admin/content/aggregator/remove/$feed->fid"), l(t('update items'), "admin/content/aggregator/update/$feed->fid")); + $rows[] = array(l($feed->title, "aggregator/sources/$feed->fid"), format_plural($feed->items, '1 item', '@count items'), ($feed->checked ? t('@time ago', array('@time' => format_interval(REQUEST_TIME - $feed->checked))) : t('never')), ($feed->checked && $feed->refresh ? t('%time left', array('%time' => format_interval($feed->checked + $feed->refresh - REQUEST_TIME))) : t('never')), l(t('edit'), "admin/settings/aggregator/edit/feed/$feed->fid"), l(t('remove items'), "admin/settings/aggregator/remove/$feed->fid"), l(t('update items'), "admin/settings/aggregator/update/$feed->fid")); } if (empty($rows)) { - $rows[] = array(array('data' => t('No feeds available. <a href="@link">Add feed</a>.', array('@link' => url('admin/content/aggregator/add/feed'))), 'colspan' => '5', 'class' => 'message')); + $rows[] = array(array('data' => t('No feeds available. <a href="@link">Add feed</a>.', array('@link' => url('admin/settings/aggregator/add/feed'))), 'colspan' => '5', 'class' => 'message')); } $output .= theme('table', $header, $rows); @@ -41,10 +41,10 @@ function aggregator_view() { $header = array(t('Title'), t('Items'), t('Operations')); $rows = array(); foreach ($result as $category) { - $rows[] = array(l($category->title, "aggregator/categories/$category->cid"), format_plural($category->items, '1 item', '@count items'), l(t('edit'), "admin/content/aggregator/edit/category/$category->cid")); + $rows[] = array(l($category->title, "aggregator/categories/$category->cid"), format_plural($category->items, '1 item', '@count items'), l(t('edit'), "admin/settings/aggregator/edit/category/$category->cid")); } if (empty($rows)) { - $rows[] = array(array('data' => t('No categories available. <a href="@link">Add category</a>.', array('@link' => url('admin/content/aggregator/add/category'))), 'colspan' => '5', 'class' => 'message')); + $rows[] = array(array('data' => t('No categories available. <a href="@link">Add category</a>.', array('@link' => url('admin/settings/aggregator/add/category'))), 'colspan' => '5', 'class' => 'message')); } $output .= theme('table', $header, $rows); @@ -169,7 +169,7 @@ function aggregator_form_feed_submit($form, &$form_state) { if (isset($form_state['values']['title'])) { drupal_set_message(t('The feed %feed has been updated.', array('%feed' => $form_state['values']['title']))); if (arg(0) == 'admin') { - $form_state['redirect'] = 'admin/content/aggregator/'; + $form_state['redirect'] = 'admin/settings/aggregator/'; return; } else { @@ -181,7 +181,7 @@ function aggregator_form_feed_submit($form, &$form_state) { watchdog('aggregator', 'Feed %feed deleted.', array('%feed' => $title)); drupal_set_message(t('The feed %feed has been deleted.', array('%feed' => $title))); if (arg(0) == 'admin') { - $form_state['redirect'] = 'admin/content/aggregator/'; + $form_state['redirect'] = 'admin/settings/aggregator/'; return; } else { @@ -191,7 +191,7 @@ function aggregator_form_feed_submit($form, &$form_state) { } } else { - watchdog('aggregator', 'Feed %feed added.', array('%feed' => $form_state['values']['title']), WATCHDOG_NOTICE, l(t('view'), 'admin/content/aggregator')); + watchdog('aggregator', 'Feed %feed added.', array('%feed' => $form_state['values']['title']), WATCHDOG_NOTICE, l(t('view'), 'admin/settings/aggregator')); drupal_set_message(t('The feed %feed has been added.', array('%feed' => $form_state['values']['title']))); } } @@ -205,7 +205,7 @@ function aggregator_admin_remove_feed($form_state, $feed) { ), ), t('Are you sure you want to remove all items from the feed %feed?', array('%feed' => $feed->title)), - 'admin/content/aggregator', + 'admin/settings/aggregator', t('This action cannot be undone.'), t('Remove items'), t('Cancel') @@ -220,7 +220,7 @@ function aggregator_admin_remove_feed($form_state, $feed) { */ function aggregator_admin_remove_feed_submit($form, &$form_state) { aggregator_remove($form_state['values']['feed']); - $form_state['redirect'] = 'admin/content/aggregator'; + $form_state['redirect'] = 'admin/settings/aggregator'; } /** @@ -339,7 +339,7 @@ function aggregator_form_opml_submit($form, &$form_state) { drupal_form_submit('aggregator_form_feed', $form_state); } - $form_state['redirect'] = 'admin/content/aggregator'; + $form_state['redirect'] = 'admin/settings/aggregator'; } /** @@ -382,7 +382,7 @@ function _aggregator_parse_opml($opml) { */ function aggregator_admin_refresh_feed($feed) { aggregator_refresh($feed); - drupal_goto('admin/content/aggregator'); + drupal_goto('admin/settings/aggregator'); } /** @@ -552,7 +552,7 @@ function aggregator_form_category_submit($form, &$form_state) { if (isset($form_state['values']['title'])) { drupal_set_message(t('The category %category has been updated.', array('%category' => $form_state['values']['title']))); if (arg(0) == 'admin') { - $form_state['redirect'] = 'admin/content/aggregator/'; + $form_state['redirect'] = 'admin/settings/aggregator/'; return; } else { @@ -564,7 +564,7 @@ function aggregator_form_category_submit($form, &$form_state) { watchdog('aggregator', 'Category %category deleted.', array('%category' => $title)); drupal_set_message(t('The category %category has been deleted.', array('%category' => $title))); if (arg(0) == 'admin') { - $form_state['redirect'] = 'admin/content/aggregator/'; + $form_state['redirect'] = 'admin/settings/aggregator/'; return; } else { @@ -574,7 +574,7 @@ function aggregator_form_category_submit($form, &$form_state) { } } else { - watchdog('aggregator', 'Category %category added.', array('%category' => $form_state['values']['title']), WATCHDOG_NOTICE, l(t('view'), 'admin/content/aggregator')); + watchdog('aggregator', 'Category %category added.', array('%category' => $form_state['values']['title']), WATCHDOG_NOTICE, l(t('view'), 'admin/settings/aggregator')); drupal_set_message(t('The category %category has been added.', array('%category' => $form_state['values']['title']))); } } diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module index 8b87a8c02..dd87879a7 100644 --- a/modules/aggregator/aggregator.module +++ b/modules/aggregator/aggregator.module @@ -18,18 +18,18 @@ function aggregator_help($path, $arg) { switch ($path) { case 'admin/help#aggregator': $output = '<p>' . t('The aggregator is a powerful on-site syndicator and news reader that gathers fresh content from RSS-, RDF-, and Atom-based feeds made available across the web. Thousands of sites (particularly news sites and blogs) publish their latest headlines and posts in feeds, using a number of standardized XML-based formats. Formats supported by the aggregator include <a href="@rss">RSS</a>, <a href="@rdf">RDF</a>, and <a href="@atom">Atom</a>.', array('@rss' => 'http://cyber.law.harvard.edu/rss/', '@rdf' => 'http://www.w3.org/RDF/', '@atom' => 'http://www.atomenabled.org')) . '</p>'; - $output .= '<p>' . t('Feeds contain feed items, or individual posts published by the site providing the feed. Feeds may be grouped in categories, generally by topic. Users view feed items in the <a href="@aggregator">main aggregator display</a> or by <a href="@aggregator-sources">their source</a>. Administrators can <a href="@feededit">add, edit and delete feeds</a> and choose how often to check each feed for newly updated items. The most recent items in either a feed or category can be displayed as a block through the <a href="@admin-block">blocks administration page</a>. A <a href="@aggregator-opml">machine-readable OPML file</a> of all feeds is available. A correctly configured <a href="@cron">cron maintenance task</a> is required to update feeds automatically.', array('@aggregator' => url('aggregator'), '@aggregator-sources' => url('aggregator/sources'), '@feededit' => url('admin/content/aggregator'), '@admin-block' => url('admin/structure/block'), '@aggregator-opml' => url('aggregator/opml'), '@cron' => url('admin/reports/status'))) . '</p>'; + $output .= '<p>' . t('Feeds contain feed items, or individual posts published by the site providing the feed. Feeds may be grouped in categories, generally by topic. Users view feed items in the <a href="@aggregator">main aggregator display</a> or by <a href="@aggregator-sources">their source</a>. Administrators can <a href="@feededit">add, edit and delete feeds</a> and choose how often to check each feed for newly updated items. The most recent items in either a feed or category can be displayed as a block through the <a href="@admin-block">blocks administration page</a>. A <a href="@aggregator-opml">machine-readable OPML file</a> of all feeds is available. A correctly configured <a href="@cron">cron maintenance task</a> is required to update feeds automatically.', array('@aggregator' => url('aggregator'), '@aggregator-sources' => url('aggregator/sources'), '@feededit' => url('admin/settings/aggregator'), '@admin-block' => url('admin/structure/block'), '@aggregator-opml' => url('aggregator/opml'), '@cron' => url('admin/reports/status'))) . '</p>'; $output .= '<p>' . t('For more information, see the online handbook entry for <a href="@aggregator">Aggregator module</a>.', array('@aggregator' => 'http://drupal.org/handbook/modules/aggregator/')) . '</p>'; return $output; - case 'admin/content/aggregator': + case 'admin/settings/aggregator': $output = '<p>' . t('Thousands of sites (particularly news sites and blogs) publish their latest headlines and posts in feeds, using a number of standardized XML-based formats. Formats supported by the aggregator include <a href="@rss">RSS</a>, <a href="@rdf">RDF</a>, and <a href="@atom">Atom</a>.', array('@rss' => 'http://cyber.law.harvard.edu/rss/', '@rdf' => 'http://www.w3.org/RDF/', '@atom' => 'http://www.atomenabled.org')) . '</p>'; - $output .= '<p>' . t('Current feeds are listed below, and <a href="@addfeed">new feeds may be added</a>. For each feed or feed category, the <em>latest items</em> block may be enabled at the <a href="@block">blocks administration page</a>.', array('@addfeed' => url('admin/content/aggregator/add/feed'), '@block' => url('admin/structure/block'))) . '</p>'; + $output .= '<p>' . t('Current feeds are listed below, and <a href="@addfeed">new feeds may be added</a>. For each feed or feed category, the <em>latest items</em> block may be enabled at the <a href="@block">blocks administration page</a>.', array('@addfeed' => url('admin/settings/aggregator/add/feed'), '@block' => url('admin/structure/block'))) . '</p>'; return $output; - case 'admin/content/aggregator/add/feed': + case 'admin/settings/aggregator/add/feed': return '<p>' . t('Add a feed in RSS, RDF or Atom format. A feed may only have one entry.') . '</p>'; - case 'admin/content/aggregator/add/category': + case 'admin/settings/aggregator/add/category': return '<p>' . t('Categories allow feed items from different feeds to be grouped together. For example, several sport-related feeds may belong to a category named <em>Sports</em>. Feed items may be grouped automatically (by selecting a category when creating or editing a feed) or manually (via the <em>Categorize</em> page available from feed item listings). Each category provides its own feed page and block.') . '</p>'; - case 'admin/content/aggregator/add/opml': + case 'admin/settings/aggregator/add/opml': return '<p>' . t('<acronym title="Outline Processor Markup Language">OPML</acronym> is an XML format used to exchange multiple feeds between aggregators. A single OPML document may contain a collection of many feeds. Drupal can parse such a file and import all feeds at once, saving you the effort of adding them manually. You may either upload a local file from your computer or enter a URL where Drupal can download it.') . '</p>'; } } @@ -86,51 +86,51 @@ function aggregator_theme() { * Implement hook_menu(). */ function aggregator_menu() { - $items['admin/content/aggregator'] = array( + $items['admin/settings/aggregator'] = array( 'title' => 'Feed aggregator', 'description' => "Configure which content your site aggregates from other sites, how often it polls them, and how they're categorized.", 'page callback' => 'aggregator_admin_overview', 'access arguments' => array('administer news feeds'), ); - $items['admin/content/aggregator/add/feed'] = array( + $items['admin/settings/aggregator/add/feed'] = array( 'title' => 'Add feed', 'page callback' => 'drupal_get_form', 'page arguments' => array('aggregator_form_feed'), 'access arguments' => array('administer news feeds'), 'type' => MENU_LOCAL_TASK, - 'parent' => 'admin/content/aggregator', + 'parent' => 'admin/settings/aggregator', ); - $items['admin/content/aggregator/add/category'] = array( + $items['admin/settings/aggregator/add/category'] = array( 'title' => 'Add category', 'page callback' => 'drupal_get_form', 'page arguments' => array('aggregator_form_category'), 'access arguments' => array('administer news feeds'), 'type' => MENU_LOCAL_TASK, - 'parent' => 'admin/content/aggregator', + 'parent' => 'admin/settings/aggregator', ); - $items['admin/content/aggregator/add/opml'] = array( + $items['admin/settings/aggregator/add/opml'] = array( 'title' => 'Import OPML', 'page callback' => 'drupal_get_form', 'page arguments' => array('aggregator_form_opml'), 'access arguments' => array('administer news feeds'), 'type' => MENU_LOCAL_TASK, - 'parent' => 'admin/content/aggregator', + 'parent' => 'admin/settings/aggregator', ); - $items['admin/content/aggregator/remove/%aggregator_feed'] = array( + $items['admin/settings/aggregator/remove/%aggregator_feed'] = array( 'title' => 'Remove items', 'page callback' => 'drupal_get_form', 'page arguments' => array('aggregator_admin_remove_feed', 4), 'access arguments' => array('administer news feeds'), 'type' => MENU_CALLBACK, ); - $items['admin/content/aggregator/update/%aggregator_feed'] = array( + $items['admin/settings/aggregator/update/%aggregator_feed'] = array( 'title' => 'Update items', 'page callback' => 'aggregator_admin_refresh_feed', 'page arguments' => array(4), 'access arguments' => array('administer news feeds'), 'type' => MENU_CALLBACK, ); - $items['admin/content/aggregator/list'] = array( + $items['admin/settings/aggregator/list'] = array( 'title' => 'List', 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10, @@ -224,14 +224,14 @@ function aggregator_menu() { 'type' => MENU_LOCAL_TASK, 'weight' => 1, ); - $items['admin/content/aggregator/edit/feed/%aggregator_feed'] = array( + $items['admin/settings/aggregator/edit/feed/%aggregator_feed'] = array( 'title' => 'Edit feed', 'page callback' => 'drupal_get_form', 'page arguments' => array('aggregator_form_feed', 5), 'access arguments' => array('administer news feeds'), 'type' => MENU_CALLBACK, ); - $items['admin/content/aggregator/edit/category/%aggregator_category'] = array( + $items['admin/settings/aggregator/edit/category/%aggregator_category'] = array( 'title' => 'Edit category', 'page callback' => 'drupal_get_form', 'page arguments' => array('aggregator_form_category', 5), diff --git a/modules/aggregator/aggregator.pages.inc b/modules/aggregator/aggregator.pages.inc index 850f013a2..29996e5b9 100644 --- a/modules/aggregator/aggregator.pages.inc +++ b/modules/aggregator/aggregator.pages.inc @@ -499,6 +499,6 @@ function template_preprocess_aggregator_feed_source(&$variables) { } if (user_access('administer news feeds')) { - $variables['last_checked'] = l($variables['last_checked'], 'admin/content/aggregator'); + $variables['last_checked'] = l($variables['last_checked'], 'admin/settings/aggregator'); } } diff --git a/modules/aggregator/aggregator.test b/modules/aggregator/aggregator.test index f72ae94ff..2c7f9b41d 100644 --- a/modules/aggregator/aggregator.test +++ b/modules/aggregator/aggregator.test @@ -14,7 +14,7 @@ class AggregatorTestCase extends DrupalWebTestCase { } /** - * Create an aggregator feed (simulate form submission on admin/content/aggregator/add/feed). + * Create an aggregator feed (simulate form submission on admin/settings/aggregator/add/feed). * * @param $feed_url * If given, feed will be created with this URL, otherwise /rss.xml will be used. @@ -25,7 +25,7 @@ class AggregatorTestCase extends DrupalWebTestCase { */ function createFeed($feed_url = NULL) { $edit = $this->getFeedEditArray($feed_url); - $this->drupalPost('admin/content/aggregator/add/feed', $edit, t('Save')); + $this->drupalPost('admin/settings/aggregator/add/feed', $edit, t('Save')); $this->assertRaw(t('The feed %name has been added.', array('%name' => $edit['title'])), t('The feed !name has been added.', array('!name' => $edit['title']))); $feed = db_query("SELECT * FROM {aggregator_feed} WHERE title = :title AND url = :url", array(':title' => $edit['title'], ':url' => $edit['url']))->fetch(); @@ -40,7 +40,7 @@ class AggregatorTestCase extends DrupalWebTestCase { * Feed object representing the feed. */ function deleteFeed($feed) { - $this->drupalPost('admin/content/aggregator/edit/feed/' . $feed->fid, array(), t('Delete')); + $this->drupalPost('admin/settings/aggregator/edit/feed/' . $feed->fid, array(), t('Delete')); $this->assertRaw(t('The feed %title has been deleted.', array('%title' => $feed->title)), t('Feed deleted successfully.')); } @@ -81,7 +81,7 @@ class AggregatorTestCase extends DrupalWebTestCase { } /** - * Update feed items (simulate click to admin/content/aggregator/update/$fid). + * Update feed items (simulate click to admin/settings/aggregator/update/$fid). * * @param $feed * Feed object representing the feed. @@ -94,7 +94,7 @@ class AggregatorTestCase extends DrupalWebTestCase { $this->assertResponse(200, t('!url is reachable.', array('!url' => $feed->url))); // Refresh the feed (simulated link click). - $this->drupalGet('admin/content/aggregator/update/' . $feed->fid); + $this->drupalGet('admin/settings/aggregator/update/' . $feed->fid); // Ensure we have the right number of items. $result = db_query('SELECT iid FROM {aggregator_item} WHERE fid = :fid', array(':fid' => $feed->fid)); @@ -114,7 +114,7 @@ class AggregatorTestCase extends DrupalWebTestCase { * Feed object representing the feed. */ function removeFeedItems($feed) { - $this->drupalPost('admin/content/aggregator/remove/' . $feed->fid, array(), t('Remove items')); + $this->drupalPost('admin/settings/aggregator/remove/' . $feed->fid, array(), t('Remove items')); $this->assertRaw(t('The news items from %title have been removed.', array('%title' => $feed->title)), t('Feed items removed.')); } @@ -274,7 +274,7 @@ class AddFeedTestCase extends AggregatorTestCase { $feed = $this->createFeed(); // Check feed data. - $this->assertEqual($this->getUrl(), url('admin/content/aggregator/add/feed', array('absolute' => TRUE)), t('Directed to correct url.')); + $this->assertEqual($this->getUrl(), url('admin/settings/aggregator/add/feed', array('absolute' => TRUE)), t('Directed to correct url.')); $this->assertTrue($this->uniqueFeed($feed->title, $feed->url), t('The feed is unique.')); // Check feed source. @@ -310,11 +310,11 @@ class UpdateFeedTestCase extends AggregatorTestCase { if (isset($feed->{$same_field})) { $edit[$same_field] = $feed->{$same_field}; } - $this->drupalPost('admin/content/aggregator/edit/feed/' . $feed->fid, $edit, t('Save')); + $this->drupalPost('admin/settings/aggregator/edit/feed/' . $feed->fid, $edit, t('Save')); $this->assertRaw(t('The feed %name has been updated.', array('%name' => $edit['title'])), t('The feed %name has been updated.', array('%name' => $edit['title']))); // Check feed data. - $this->assertEqual($this->getUrl(), url('admin/content/aggregator/', array('absolute' => TRUE))); + $this->assertEqual($this->getUrl(), url('admin/settings/aggregator/', array('absolute' => TRUE))); $this->assertTrue($this->uniqueFeed($edit['title'], $edit['url']), t('The feed is unique.')); // Check feed source. @@ -367,7 +367,7 @@ class UpdateFeedItemTestCase extends AggregatorTestCase { } /** - * Test running "update items" from the 'admin/content/aggregator' page. + * Test running "update items" from the 'admin/settings/aggregator' page. */ function testUpdateFeedItem() { $this->createSampleNodes(); @@ -391,11 +391,11 @@ class UpdateFeedItemTestCase extends AggregatorTestCase { $this->drupalGet($edit['url']); $this->assertResponse(array(200), t('URL !url is accessible', array('!url' => $edit['url']))); - $this->drupalPost('admin/content/aggregator/add/feed', $edit, t('Save')); + $this->drupalPost('admin/settings/aggregator/add/feed', $edit, t('Save')); $this->assertRaw(t('The feed %name has been added.', array('%name' => $edit['title'])), t('The feed !name has been added.', array('!name' => $edit['title']))); $feed = db_query("SELECT * FROM {aggregator_feed} WHERE url = :url", array(':url' => $edit['url']))->fetchObject(); - $this->drupalGet('admin/content/aggregator/update/' . $feed->fid); + $this->drupalGet('admin/settings/aggregator/update/' . $feed->fid); $before = db_query('SELECT timestamp FROM {aggregator_item} WHERE fid = :fid', array(':fid' => $feed->fid))->fetchField(); @@ -410,7 +410,7 @@ class UpdateFeedItemTestCase extends AggregatorTestCase { 'modified' => 0, )) ->execute(); - $this->drupalGet('admin/content/aggregator/update/' . $feed->fid); + $this->drupalGet('admin/settings/aggregator/update/' . $feed->fid); $after = db_query('SELECT timestamp FROM {aggregator_item} WHERE fid = :fid', array(':fid' => $feed->fid))->fetchField(); @@ -428,7 +428,7 @@ class RemoveFeedItemTestCase extends AggregatorTestCase { } /** - * Test running "remove items" from the 'admin/content/aggregator' page. + * Test running "remove items" from the 'admin/settings/aggregator' page. */ function testRemoveFeedItem() { // Create a bunch of test feeds. @@ -472,9 +472,9 @@ class CategorizeFeedItemTestCase extends AggregatorTestCase { function testCategorizeFeedItem() { $this->createSampleNodes(); - // Simulate form submission on "admin/content/aggregator/add/category". + // Simulate form submission on "admin/settings/aggregator/add/category". $edit = array('title' => $this->randomName(10), 'description' => ''); - $this->drupalPost('admin/content/aggregator/add/category', $edit, t('Save')); + $this->drupalPost('admin/settings/aggregator/add/category', $edit, t('Save')); $this->assertRaw(t('The category %title has been added.', array('%title' => $edit['title'])), t('The category %title has been added.', array('%title' => $edit['title']))); $category = db_query("SELECT * FROM {aggregator_category} WHERE title = :title", array(':title' => $edit['title']))->fetch(); @@ -536,7 +536,7 @@ class ImportOPMLTestCase extends AggregatorTestCase { )) ->execute(); - $this->drupalGet('admin/content/aggregator/add/opml'); + $this->drupalGet('admin/settings/aggregator/add/opml'); $this->assertText('A single OPML document may contain a collection of many feeds.', t('Looking for help text.')); $this->assertFieldByName('files[upload]', '', t('Looking for file upload field.')); $this->assertFieldByName('remote', '', t('Looking for remote URL field.')); @@ -551,7 +551,7 @@ class ImportOPMLTestCase extends AggregatorTestCase { $before = db_query('SELECT COUNT(*) FROM {aggregator_feed}')->fetchField(); $form = array(); - $this->drupalPost('admin/content/aggregator/add/opml', $form, t('Import')); + $this->drupalPost('admin/settings/aggregator/add/opml', $form, t('Import')); $this->assertRaw(t('You must <em>either</em> upload a file or enter a URL.'), t('Error if no fields are filled.')); $path = $this->getEmptyOpml(); @@ -559,11 +559,11 @@ class ImportOPMLTestCase extends AggregatorTestCase { 'files[upload]' => $path, 'remote' => file_create_url($path), ); - $this->drupalPost('admin/content/aggregator/add/opml', $form, t('Import')); + $this->drupalPost('admin/settings/aggregator/add/opml', $form, t('Import')); $this->assertRaw(t('You must <em>either</em> upload a file or enter a URL.'), t('Error if both fields are filled.')); $form = array('remote' => 'invalidUrl://empty'); - $this->drupalPost('admin/content/aggregator/add/opml', $form, t('Import')); + $this->drupalPost('admin/settings/aggregator/add/opml', $form, t('Import')); $this->assertText(t('This URL is not valid.'), t('Error if the URL is invalid.')); $after = db_query('SELECT COUNT(*) FROM {aggregator_feed}')->fetchField(); @@ -577,11 +577,11 @@ class ImportOPMLTestCase extends AggregatorTestCase { $before = db_query('SELECT COUNT(*) FROM {aggregator_feed}')->fetchField(); $form['files[upload]'] = $this->getInvalidOpml(); - $this->drupalPost('admin/content/aggregator/add/opml', $form, t('Import')); + $this->drupalPost('admin/settings/aggregator/add/opml', $form, t('Import')); $this->assertText(t('No new feed has been added.'), t('Attempting to upload invalid XML.')); $form = array('remote' => file_create_url($this->getEmptyOpml())); - $this->drupalPost('admin/content/aggregator/add/opml', $form, t('Import')); + $this->drupalPost('admin/settings/aggregator/add/opml', $form, t('Import')); $this->assertText(t('No new feed has been added.'), t('Attempting to load empty OPML from remote URL.')); $after = db_query('SELECT COUNT(*) FROM {aggregator_feed}')->fetchField(); @@ -608,7 +608,7 @@ class ImportOPMLTestCase extends AggregatorTestCase { 'refresh' => '900', 'category[1]' => $category, ); - $this->drupalPost('admin/content/aggregator/add/opml', $form, t('Import')); + $this->drupalPost('admin/settings/aggregator/add/opml', $form, t('Import')); $this->assertRaw(t('A feed with the URL %url already exists.', array('%url' => $feeds[0]['url'])), t('Verifying that a duplicate URL was identified')); $this->assertRaw(t('A feed named %title already exists.', array('%title' => $feeds[1]['title'])), t('Verifying that a duplicate title was identified')); |