You are here

public function FeatureContext::assertNotRegionVariationHasLink in Acquia Lift Connector 7.2

Same name and namespace in other branches
  1. 7 behat-tests/features/bootstrap/FeatureContext.php \FeatureContext::assertNotRegionVariationHasLink()

@Then :variation_set set :variation variation should not have the :link link

Throws

\Exception If the menu cannot be found or the link can be found.

File

behat-tests/features/bootstrap/FeatureContext.php, line 431

Class

FeatureContext
Defines application features from the specific context.

Code

public function assertNotRegionVariationHasLink($variation_set, $variation, $link) {
  $css = $this
    ->getVariationLinkCss($variation_set, $variation, $link);

  // Now find the link and return it.
  $element = $this
    ->findElementInRegion($css, 'lift_tray');
  if (!empty($element)) {
    throw new \Exception(sprintf('Found the link "%s" for set "%s" and variation "%s" on page %s using selector %s.', $link, $variation_set, $variation, $this
      ->getSession()
      ->getCurrentUrl(), $css));
  }
}