You are here

public function TestSubContext::iAmViewingALandingPage in Drupal Commons 7.3

@Given I am viewing a landing page

File

tests/steps/commons_test.behat.inc, line 374
Provide Behat step-definitions for generic Commons tests.

Class

TestSubContext

Code

public function iAmViewingALandingPage() {
  $node = (object) array(
    'type' => 'commons_test_landing_page',
    'title' => $this
      ->getRandom()
      ->name(8),
  );
  $saved = $this
    ->nodeCreate($node);

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