03315a9cffa43fe152e5d4fac9ca7e2adcffdae0
[yaffs-website] / vendor / behat / mink / src / Selector / ExactNamedSelector.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  * Exact match selector engine. Like the Named selector engine but ignores partial matches.
15  */
16 class ExactNamedSelector extends NamedSelector
17 {
18     public function __construct()
19     {
20         $this->registerReplacement('%tagTextMatch%', 'normalize-space(string(.)) = %locator%');
21         $this->registerReplacement('%valueMatch%', './@value = %locator%');
22         $this->registerReplacement('%titleMatch%', './@title = %locator%');
23         $this->registerReplacement('%altMatch%', './@alt = %locator%');
24         $this->registerReplacement('%relMatch%', './@rel = %locator%');
25         $this->registerReplacement('%labelAttributeMatch%', './@label = %locator%');
26
27         parent::__construct();
28     }
29 }