function AggregatorRenderingTestCase::testFeedPage

Creates a feed and checks that feed's page.

File

modules/aggregator/aggregator.test, line 984

Class

AggregatorRenderingTestCase
Tests rendering functionality in the 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), 'Individual source page contains a pager.');
    // Reset the number of items in rss.xml to the default value.
    variable_set('feed_default_items', 10);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.