You are here

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

Checks if one unit is being locked by a booking in a date range.

Parameters

$unit_name:

$start_date:

$end_date:

$status:

2 calls to FeatureContext::checkUnitLockedByLastBooking()
FeatureContext::theUnitShouldBeConfirmedBetweenAnd in test/features/bootstrap/FeatureContext.php
@Then /^the "([^"]*)" unit should be Confirmed by the last booking between "([^"]*)" and "([^"]*)"$/
FeatureContext::theUnitShouldBeUnconfirmedBetweenAnd in test/features/bootstrap/FeatureContext.php
@Then /^the "([^"]*)" unit should be Unconfirmed by the last booking between "([^"]*)" and "([^"]*)"$/

File

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

Class

FeatureContext
Features context.

Code

protected function checkUnitLockedByLastBooking($unit_name, $start_date, $end_date, $status) {
  $booking_id = $this
    ->getLastBooking();
  $expected_value = rooms_availability_assign_id($booking_id, $status);
  $this
    ->checkUnitPropertyRange($unit_name, $start_date, $end_date, $expected_value, 'availability');
}