You are here

public function PartialNamedSelector::__construct in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/behat/mink/src/Selector/PartialNamedSelector.php \Behat\Mink\Selector\PartialNamedSelector::__construct()

Creates selector instance.

Overrides NamedSelector::__construct

File

vendor/behat/mink/src/Selector/PartialNamedSelector.php, line 20

Class

PartialNamedSelector
Named selectors engine. Uses registered XPath selectors to create new expressions.

Namespace

Behat\Mink\Selector

Code

public function __construct() {
  $this
    ->registerReplacement('%tagTextMatch%', 'contains(normalize-space(string(.)), %locator%)');
  $this
    ->registerReplacement('%valueMatch%', 'contains(./@value, %locator%)');
  $this
    ->registerReplacement('%titleMatch%', 'contains(./@title, %locator%)');
  $this
    ->registerReplacement('%altMatch%', 'contains(./@alt, %locator%)');
  $this
    ->registerReplacement('%relMatch%', 'contains(./@rel, %locator%)');
  $this
    ->registerReplacement('%labelAttributeMatch%', 'contains(./@label, %locator%)');
  parent::__construct();
}