You are here

public function FeatureContext::assertEditNodeOfType in Rooms - Drupal Booking for Hotels, B&Bs and Vacation Rentals 7

Asserts that a given node type is editable.

File

test/features/bootstrap/FeatureContext.php, line 904

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'));
}