On PHP 8, I get these errors when running tests:

PHP Deprecated:  Optional parameter $message declared before required parameter $not_exists is implicitly treated as a required parameter in /var/www/drupal/sites/all/modules/contrib/selenium/drupal_selenium_web_test_case.php on line 291

PHP Fatal error:  Declaration of DrupalSeleniumWebTestCase::drupalGet($url) must be compatible with DrupalWebTestCase::drupalGet($path, array $options = [], array $headers = []) in /var/www/drupal/sites/all/modules/contrib/selenium/drupal_selenium_web_test_case.php on line 253

PHP Fatal error:  Declaration of DrupalSeleniumWebTestCase::drupalPost($path, $edit, $submit, $disable_js = []) must be compatible with DrupalWebTestCase::drupalPost($path, $edit, $submit, array $options = [], array $headers = [], $form_html_id = null, $extra_post = null) in /var/www/drupal/sites/all/modules/contrib/selenium/drupal_selenium_web_test_case.php on line 836

PHP Fatal error:  Declaration of DrupalSeleniumWebTestCase::getSelectedItem(SeleniumWebElement $element) must be compatible with DrupalWebTestCase::getSelectedItem(SimpleXMLElement $element) in /var/www/drupal/sites/all/modules/contrib/selenium/drupal_selenium_web_test_case.php on line 973

Comments

Ronino created an issue. See original summary.

ronino’s picture

Status: Active » Needs review
StatusFileSize
new5.07 KB

Here's the fix.