Mercurial > hg > isophonics-drupal-site
comparison core/tests/Drupal/Tests/HiddenFieldSelector.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
1 <?php | |
2 | |
3 namespace Drupal\Tests; | |
4 | |
5 use Behat\Mink\Selector\PartialNamedSelector; | |
6 | |
7 /** | |
8 * Extends PartialNamedSelector to allow retrieval of hidden fields. | |
9 * | |
10 * @see \Behat\Mink\Selector\PartialNamedSelector | |
11 */ | |
12 class HiddenFieldSelector extends PartialNamedSelector { | |
13 | |
14 /** | |
15 * {@inheritdoc} | |
16 */ | |
17 public function __construct() { | |
18 $xpath = ".//input[%lowercaseType% = 'hidden' and (%idOrNameMatch% or %valueMatch%)]"; | |
19 $this->registerNamedXpath('hidden_field', $xpath); | |
20 parent::__construct(); | |
21 } | |
22 | |
23 } |