You are here

public function PermissionsByTermContext::iCreateNodesOfType in Permissions by Term 8

@Given /^I create (\d+) nodes of type "([^"]*)"$/

File

tests/src/Behat/Context/PermissionsByTermContext.php, line 89

Class

PermissionsByTermContext
Class PermissionsByTermContext

Namespace

Drupal\Tests\permissions_by_term\Behat\Context

Code

public function iCreateNodesOfType($number, $type) {
  for ($i = 0; $i <= $number; $i++) {
    $node = new \stdClass();
    $node->type = $type;
    $node->title = $this
      ->createRandomString();
    $node->body = $this
      ->createRandomString();
    $this
      ->nodeCreate($node);
  }
}