You are here

protected function FeatureContext::iAmDoingOnTheType 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::iAmDoingOnTheType()

Redirects user to the action page for the given unit.

Parameters

$action:

$unit_name:

2 calls to FeatureContext::iAmDoingOnTheType()
FeatureContext::iAmEditingTheType in test/behat/features/bootstrap/FeatureContext.php
@When /^I am editing the "([^"]*)" type$/
FeatureContext::iAmOnTheType in test/behat/features/bootstrap/FeatureContext.php
@When /^I am on the "([^"]*)" type$/

File

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

Class

FeatureContext
Features context.

Code

protected function iAmDoingOnTheType($action, $type_name) {
  $unit_id = $this
    ->findTypeByName($type_name);
  $url = "admin/bat/config/types/manage/{$type_id}/{$action}";
  $this
    ->getSession()
    ->visit($this
    ->locatePath($url));
}