function AggregatorTestCase::getFeedEditArray

Returns a randomly generated feed edit array.

Parameters

$feed_url: (optional) If given, feed will be created with this URL, otherwise /rss.xml will be used. Defaults to NULL.

Return value

A feed array.

4 calls to AggregatorTestCase::getFeedEditArray()
AggregatorTestCase::createFeed in modules/aggregator/aggregator.test
Creates an aggregator feed.
CategorizeFeedTestCase::testCategorizeFeed in modules/aggregator/aggregator.test
Creates a feed and makes sure you can add/delete categories to it.
ImportOPMLTestCase::submitImportForm in modules/aggregator/aggregator.test
Submits form with invalid, empty, and valid OPML files.
UpdateFeedTestCase::testUpdateFeed in modules/aggregator/aggregator.test
Creates a feed and attempts to update it.

File

modules/aggregator/aggregator.test, line 63

Class

AggregatorTestCase
Defines a base class for testing the Aggregator module.

Code

function getFeedEditArray($feed_url = NULL) {
    $feed_name = $this->randomName(10);
    if (!$feed_url) {
        $feed_url = url('rss.xml', array(
            'query' => array(
                'feed' => $feed_name,
            ),
            'absolute' => TRUE,
        ));
    }
    $edit = array(
        'title' => $feed_name,
        'url' => $feed_url,
        'refresh' => '900',
    );
    return $edit;
}

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