You are here

public function FeatureContext::assertEditNodeOfType in Booking and Availability Management Tools for Drupal 8

Same name and namespace in other branches
  1. 7 test/behat/features/bootstrap/FeatureContext.php \FeatureContext::assertEditNodeOfType()

Asserts that a given node type is editable.

File

test/behat/features/bootstrap/FeatureContext.php, line 160

Class

FeatureContext
Features context.

Code

public function assertEditNodeOfType($type) {
  $node = (object) array(
    'type' => $type,
  );
  $saved = $this
    ->getDriver()
    ->createNode($node);
  $this->nodes[] = $saved;

  // Set internal browser on the node edit page.
  $this
    ->getSession()
    ->visit($this
    ->locatePath('/node/' . $saved->nid . '/edit'));
}