From e15bbff78a7b16b816c97d360638992294df42e3 Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Thu, 31 Oct 2019 18:20:44 +0100 Subject: [PATCH] Issue #3005352 by hchonov, oknate: Passing a Session object to the ExpectationException constructor is deprecated as of Mink 1.7. Pass the driver instead --- core/tests/Drupal/Tests/WebAssert.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/tests/Drupal/Tests/WebAssert.php b/core/tests/Drupal/Tests/WebAssert.php index 08c54a1a8c9..7b296263ae4 100644 --- a/core/tests/Drupal/Tests/WebAssert.php +++ b/core/tests/Drupal/Tests/WebAssert.php @@ -74,7 +74,7 @@ class WebAssert extends MinkWebAssert { $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 @@ class WebAssert extends MinkWebAssert { ]); 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 @@ class WebAssert extends MinkWebAssert { ]); 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 @@ class WebAssert extends MinkWebAssert { ]); 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]);