function AggregatorTestCase::createSampleNodes

Creates sample article nodes.

Parameters

$count: (optional) The number of nodes to generate. Defaults to five.

10 calls to AggregatorTestCase::createSampleNodes()
AggregatorCronTestCase::testCron in drupal-7.x/modules/aggregator/aggregator.test
Adds feeds and updates them via cron process.
AggregatorCronTestCase::testCron in drupal-7.x/modules/aggregator/aggregator.test
Adds feeds and updates them via cron process.
AggregatorRenderingTestCase::testBlockLinks in drupal-7.x/modules/aggregator/aggregator.test
Adds a feed block to the page and checks its links.
AggregatorRenderingTestCase::testBlockLinks in drupal-7.x/modules/aggregator/aggregator.test
Adds a feed block to the page and checks its links.
AggregatorRenderingTestCase::testFeedPage in drupal-7.x/modules/aggregator/aggregator.test
Creates a feed and checks that feed's page.

... See full list

Archivo

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

Class

AggregatorTestCase
Defines a base class for testing the Aggregator module.

Código

function createSampleNodes($count = 5) {
  $langcode = LANGUAGE_NONE;
  // Post $count article nodes.
  for ($i = 0; $i < $count; $i++) {
    $edit = array();
    $edit['title'] = $this->randomName();
    $edit["body[$langcode][0][value]"] = $this->randomName();
    $this->drupalPost('node/add/article', $edit, t('Save'));
  }
}