public function TestSubContext::iAmViewingLandingPage in Panopoly 8.2
Creates and views a landing page.
@Given I am viewing a landing page
File
- modules/
panopoly/ panopoly_test/ behat/ steps/ panopoly_test.behat.inc, line 717 - Provide Behat step-definitions for generic Panopoly tests.
Class
- TestSubContext
- Behat sub-context for Panopoly.
Code
public function iAmViewingLandingPage() {
$node = (object) [
'type' => 'panopoly_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));
}