Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / tests / Drupal / Tests / HiddenFieldSelector.php
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 }