You are here

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

Redirects user to the action page for the given unit.

Parameters

$action:

$unit_name:

5 calls to FeatureContext::iAmDoingOnTheUnit()
FeatureContext::iAmDeletingTheUnit in test/features/bootstrap/FeatureContext.php
@When /^I am deleting the "([^"]*)" unit$/
FeatureContext::iAmEditingTheUnit in test/features/bootstrap/FeatureContext.php
@When /^I am editing the "([^"]*)" unit$/
FeatureContext::iAmManagingTheUnitAvailability in test/features/bootstrap/FeatureContext.php
@When /^I am managing the "([^"]*)" unit availability$/
FeatureContext::iAmManagingTheUnitPricing in test/features/bootstrap/FeatureContext.php
@When /^I am managing the "([^"]*)" unit pricing$/
FeatureContext::iAmOnTheUnit in test/features/bootstrap/FeatureContext.php
@When /^I am on the "([^"]*)" unit$/

File

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

Class

FeatureContext
Features context.

Code

protected function iAmDoingOnTheUnit($action, $unit_name) {
  $unit_id = $this
    ->findBookableUnitByName($unit_name);
  $url = "admin/rooms/units/unit/{$unit_id}/{$action}";
  $this
    ->getSession()
    ->visit($this
    ->locatePath($url));
}