Chris@0: Chris@0: * Chris@0: * For the full copyright and license information, please view the LICENSE Chris@0: * file that was distributed with this source code. Chris@0: */ Chris@0: Chris@0: namespace Behat\Mink\Selector; Chris@0: Chris@0: /** Chris@0: * Exact match selector engine. Like the Named selector engine but ignores partial matches. Chris@0: */ Chris@0: class ExactNamedSelector extends NamedSelector Chris@0: { Chris@0: public function __construct() Chris@0: { Chris@0: $this->registerReplacement('%tagTextMatch%', 'normalize-space(string(.)) = %locator%'); Chris@0: $this->registerReplacement('%valueMatch%', './@value = %locator%'); Chris@0: $this->registerReplacement('%titleMatch%', './@title = %locator%'); Chris@0: $this->registerReplacement('%altMatch%', './@alt = %locator%'); Chris@0: $this->registerReplacement('%relMatch%', './@rel = %locator%'); Chris@0: $this->registerReplacement('%labelAttributeMatch%', './@label = %locator%'); Chris@0: Chris@0: parent::__construct(); Chris@0: } Chris@0: }