You are here

protected function PanelsEverywhereTestHelper::createSampleNodes in Panels Everywhere 7

Create some sample content for testing nodes.

Parameters

string $keyword: The first word to be added to the title.

int $number: How many items to create.

Return value

array All of the node objects that were created.

File

tests/PanelsEverywhereTestHelper.test, line 64
Some helper functions for the other tests.

Class

PanelsEverywhereTestHelper
@file Some helper functions for the other tests.

Code

protected function createSampleNodes($keyword = 'test', $number = 5) {
  $nodes = array();
  for ($ctr = 1; $ctr <= $number; $ctr++) {
    $nodes[] = $this
      ->drupalCreateNode(array(
      'title' => $keyword . ' #' . $number . '; ' . $this
        ->randomName(8),
    ));
  }
  return $nodes;
}