diff --git a/core/tests/Drupal/Tests/WebAssert.php b/core/tests/Drupal/Tests/WebAssert.php index 08c54a1a8c..53645c83a8 100644 --- a/core/tests/Drupal/Tests/WebAssert.php +++ b/core/tests/Drupal/Tests/WebAssert.php @@ -27,7 +27,7 @@ class WebAssert extends MinkWebAssert { * Constructor. * * @param \Behat\Mink\Session $session - * The Behat session object; + * The Behat session object. * @param string $base_url * The base URL of the site under test. */ @@ -74,7 +74,7 @@ public function buttonExists($button, TraversableElement $container = NULL) { $node = $container->findButton($button); if ($node === NULL) { - throw new ElementNotFoundException($this->session, 'button', 'id|name|label|value', $button); + throw new ElementNotFoundException($this->session->getDriver(), 'button', 'id|name|label|value', $button); } return $node; @@ -120,7 +120,7 @@ public function selectExists($select, TraversableElement $container = NULL) { ]); if ($node === NULL) { - throw new ElementNotFoundException($this->session, 'select', 'id|name|label|value', $select); + throw new ElementNotFoundException($this->session->getDriver(), 'select', 'id|name|label|value', $select); } return $node; @@ -150,7 +150,7 @@ public function optionExists($select, $option, TraversableElement $container = N ]); if ($select_field === NULL) { - throw new ElementNotFoundException($this->session, 'select', 'id|name|label|value', $select); + throw new ElementNotFoundException($this->session->getDriver(), 'select', 'id|name|label|value', $select); } $option_field = $select_field->find('named', ['option', $option]); @@ -183,7 +183,7 @@ public function optionNotExists($select, $option, TraversableElement $container ]); if ($select_field === NULL) { - throw new ElementNotFoundException($this->session, 'select', 'id|name|label|value', $select); + throw new ElementNotFoundException($this->session->getDriver(), 'select', 'id|name|label|value', $select); } $option_field = $select_field->find('named', ['option', $option]);