| 7 aggregator.test | public AggregatorRenderingTestCase::testFeedPage() |
| 8 aggregator.test | public AggregatorRenderingTestCase::testFeedPage() |
Create a feed and check that feed's page.
File
- modules/
aggregator/ aggregator.test, line 866 - Tests for aggregator.module.
Code
public function testFeedPage() {
// Increase the number of items published in the rss.xml feed so we have
// enough articles to test paging.
variable_set('feed_default_items', 30);
// Create a feed with 30 items.
$this->createSampleNodes(30);
$feed = $this->createFeed();
$this->updateFeedItems($feed, 30);
// Check for the presence of a pager.
$this->drupalGet('aggregator/sources/' . $feed->fid);
$elements = $this->xpath("//ul[@class=:class]", array(':class' => 'pager'));
$this->assertTrue(!empty($elements), t('Individual source page contains a pager.'));
// Reset the number of items in rss.xml to the default value.
variable_set('feed_default_items', 10);
}
Login or register to post comments