You are here

public function ViewsExposedGroupsTestBase::createNodes in Views exposed groups 7.2

Create multiple nodes for the test.

Parameters

int $count: The number of nodes to create.

Return value

array An array of node objects keyed by entity ID.

1 call to ViewsExposedGroupsTestBase::createNodes()
ViewsExposedGroupsTestBase::setUp in tests/views_exposed_groups.test
Sets up a Drupal site for running functional and integration tests.

File

tests/views_exposed_groups.test, line 86
Views Exposed Groups UI Test.

Class

ViewsExposedGroupsTestBase
Base test class for views_exposed_groups module tests.

Code

public function createNodes($count = 5) {
  $content = [];
  for ($i = 0; $i < $count; $i++) {
    $node = $this
      ->drupalCreateNode();
    $content[$node->nid] = $node;
  }
  return $content;
}