/** * Transforms from step definition's argument style to Mink format. * * Delegates all the process to BehatBase::transform_selector() checking * the provided $selectortype. * * @throws ExpectationException * @param string $selectortype It can be css, xpath or any of the named selectors. * @param string $element The locator (or string) we are looking for. * @return array Contains the selector and the locator expected by Mink. */ protected function transform_text_selector($selectortype, $element) { $selectors = BehatSelectors::get_allowed_text_selectors(); if (empty($selectors[$selectortype])) { throw new ExpectationException('The "' . $selectortype . '" selector can not be used to select text nodes', $this->getSession()); } return $this->transform_selector($selectortype, $element); }