4 * This file is part of the Mink package.
5 * (c) Konstantin Kudryashov <ever.zet@gmail.com>
7 * For the full copyright and license information, please view the LICENSE
8 * file that was distributed with this source code.
11 namespace Behat\Mink\Selector;
14 * Named selectors engine. Uses registered XPath selectors to create new expressions.
16 * @author Konstantin Kudryashov <ever.zet@gmail.com>
18 class PartialNamedSelector extends NamedSelector
20 public function __construct()
22 $this->registerReplacement('%tagTextMatch%', 'contains(normalize-space(string(.)), %locator%)');
23 $this->registerReplacement('%valueMatch%', 'contains(./@value, %locator%)');
24 $this->registerReplacement('%titleMatch%', 'contains(./@title, %locator%)');
25 $this->registerReplacement('%altMatch%', 'contains(./@alt, %locator%)');
26 $this->registerReplacement('%relMatch%', 'contains(./@rel, %locator%)');
27 $this->registerReplacement('%labelAttributeMatch%', 'contains(./@label, %locator%)');
29 parent::__construct();