You are here

public function FeedsWebTestCase::createFeedNodes in Feeds 7.2

Same name and namespace in other branches
  1. 6 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::initSyndication in tests/feeds_scheduler.test
Initialize scheduling.

File

tests/feeds.test, line 336
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;
}