Security update for permissions_by_term
[yaffs-website] / vendor / behat / mink / src / Selector / PartialNamedSelector.php
1 <?php
2
3 /*
4  * This file is part of the Mink package.
5  * (c) Konstantin Kudryashov <ever.zet@gmail.com>
6  *
7  * For the full copyright and license information, please view the LICENSE
8  * file that was distributed with this source code.
9  */
10
11 namespace Behat\Mink\Selector;
12
13 /**
14  * Named selectors engine. Uses registered XPath selectors to create new expressions.
15  *
16  * @author Konstantin Kudryashov <ever.zet@gmail.com>
17  */
18 class PartialNamedSelector extends NamedSelector
19 {
20     public function __construct()
21     {
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%)');
28
29         parent::__construct();
30     }
31 }