You are here

class PartialNamedSelector in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/behat/mink/src/Selector/PartialNamedSelector.php \Behat\Mink\Selector\PartialNamedSelector

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

@author Konstantin Kudryashov <ever.zet@gmail.com>

Hierarchy

Expanded class hierarchy of PartialNamedSelector

1 file declares its use of PartialNamedSelector
PartialNamedSelectorTest.php in vendor/behat/mink/tests/Selector/PartialNamedSelectorTest.php

File

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

Namespace

Behat\Mink\Selector
View source
class PartialNamedSelector extends NamedSelector {
  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();
  }

}

Members

Namesort descending Modifiers Type Description Overrides
NamedSelector::$replacements private property
NamedSelector::$selectors private property
NamedSelector::$xpathEscaper private property
NamedSelector::escapeLocator private function
NamedSelector::registerNamedXpath public function Registers new XPath selector with specified name.
NamedSelector::registerReplacement protected function Registers a replacement in the list of replacements.
NamedSelector::translateToXPath public function Translates provided locator into XPath. Overrides SelectorInterface::translateToXPath
PartialNamedSelector::__construct public function Creates selector instance. Overrides NamedSelector::__construct