public function ViewsExposedGroupsTestBase::createNodes in Views exposed groups 3.0.x
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/
src/ Functional/ ViewsExposedGroupsTestBase.php
File
- tests/
src/ Functional/ ViewsExposedGroupsTestBase.php, line 90
Class
- ViewsExposedGroupsTestBase
- Base test class for views_exposed_groups module tests.
Namespace
Drupal\Tests\views_exposed_groups\FunctionalCode
public function createNodes($count = 5) {
$content = [];
for ($i = 0; $i < $count; $i++) {
$node = $this
->drupalCreateNode();
$content[$node
->id()] = $node;
}
return $content;
}