function AggregatorTestCase::getFeedEditArray

7.x aggregator.test AggregatorTestCase::getFeedEditArray($feed_url = NULL)

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 drupal-7.x/modules/aggregator/aggregator.test
Creates an aggregator feed.
CategorizeFeedTestCase::testCategorizeFeed in drupal-7.x/modules/aggregator/aggregator.test
Creates a feed and makes sure you can add more than one category to it.
ImportOPMLTestCase::submitImportForm in drupal-7.x/modules/aggregator/aggregator.test
Submits form with invalid, empty, and valid OPML files.
UpdateFeedTestCase::testUpdateFeed in drupal-7.x/modules/aggregator/aggregator.test
Creates a feed and attempts to update it.

File

drupal-7.x/modules/aggregator/aggregator.test, line 63
Tests for aggregator.module.

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;
}