src/Drupal/DrupalExtension/Context/MarkupContext.php 1 location
|
@@ 25-33 (lines=9) @@
|
| 22 |
|
* |
| 23 |
|
* @todo this should be a trait when PHP 5.3 support is dropped. |
| 24 |
|
*/ |
| 25 |
|
public function getRegion($region) { |
| 26 |
|
$session = $this->getSession(); |
| 27 |
|
$regionObj = $session->getPage()->find('region', $region); |
| 28 |
|
if (!$regionObj) { |
| 29 |
|
throw new \Exception(sprintf('No region "%s" found on the page %s.', $region, $session->getCurrentUrl())); |
| 30 |
|
} |
| 31 |
|
|
| 32 |
|
return $regionObj; |
| 33 |
|
} |
| 34 |
|
|
| 35 |
|
/** |
| 36 |
|
* Checks if a button with id|name|title|alt|value exists in a region |
src/Drupal/DrupalExtension/Context/MinkContext.php 1 location
|
@@ 34-42 (lines=9) @@
|
| 31 |
|
* |
| 32 |
|
* @return \Behat\Mink\Element\NodeElement |
| 33 |
|
*/ |
| 34 |
|
public function getRegion($region) { |
| 35 |
|
$session = $this->getSession(); |
| 36 |
|
$regionObj = $session->getPage()->find('region', $region); |
| 37 |
|
if (!$regionObj) { |
| 38 |
|
throw new \Exception(sprintf('No region "%s" found on the page %s.', $region, $session->getCurrentUrl())); |
| 39 |
|
} |
| 40 |
|
|
| 41 |
|
return $regionObj; |
| 42 |
|
} |
| 43 |
|
|
| 44 |
|
/** |
| 45 |
|
* Visit a given path, and additionally check for HTTP response code 200. |