You are here

public function FeedsWebTestCase::createFeedNodes in Feeds 6

Same name and namespace in other branches
  1. 7.2 tests/feeds.test \FeedsWebTestCase::createFeedNodes()
  2. 7 tests/feeds.test.inc \FeedsWebTestCase::createFeedNodes()

Batch create a variable amount of feed nodes. All will have the same URL configured.

Return value

An array of node ids of the nodes created.

2 calls to FeedsWebTestCase::createFeedNodes()
FeedsExamplesFeedTestCase::test in feeds_news/feeds_news.test
Run tests.
FeedsSchedulerTestCase::testScheduling in tests/feeds_scheduler.test
Test scheduling on cron.

File

tests/feeds.test, line 253
Common functionality for all Feeds tests.

Class

FeedsWebTestCase
Test basic Data API functionality.

Code

public function createFeedNodes($id = 'syndication', $num = 20, $content_type = NULL) {
  $nids = array();
  for ($i = 0; $i < $num; $i++) {
    $nids[] = $this
      ->createFeedNode($id, NULL, $this
      ->randomName(), $content_type);
  }
  return $nids;
}