Update to Drupal 8.1.2. For more information, see https://www.drupal.org/project/drupal/releases/8.1.2
This commit is contained in:
parent
9eae24d844
commit
28556d630e
1322 changed files with 6699 additions and 2064 deletions
|
|
@ -11,6 +11,7 @@
|
|||
namespace Behat\Mink\Selector;
|
||||
|
||||
use Symfony\Component\CssSelector\CssSelector as CSS;
|
||||
use Symfony\Component\CssSelector\CssSelectorConverter;
|
||||
|
||||
/**
|
||||
* CSS selector engine. Transforms CSS to XPath.
|
||||
|
|
@ -32,6 +33,14 @@ class CssSelector implements SelectorInterface
|
|||
throw new \InvalidArgumentException('The CssSelector expects to get a string as locator');
|
||||
}
|
||||
|
||||
// Symfony 2.8+ API
|
||||
if (class_exists('Symfony\Component\CssSelector\CssSelectorConverter')) {
|
||||
$converter = new CssSelectorConverter();
|
||||
|
||||
return $converter->toXPath($locator);
|
||||
}
|
||||
|
||||
// old static API for Symfony 2.7 and older
|
||||
return CSS::toXPath($locator);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue