You are here

protected function WebDriverTestBase::getMinkDriverArgs in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php \Drupal\FunctionalJavascriptTests\WebDriverTestBase::getMinkDriverArgs()
  2. 9 core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php \Drupal\FunctionalJavascriptTests\WebDriverTestBase::getMinkDriverArgs()

Get the Mink driver args from an environment variable, if it is set. Can be overridden in a derived class so it is possible to use a different value for a subset of tests, e.g. the JavaScript tests.

Return value

string|false The JSON-encoded argument string. False if it is not set.

Overrides BrowserTestBase::getMinkDriverArgs

File

core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php, line 141

Class

WebDriverTestBase
Runs a browser test using a driver that supports JavaScript.

Namespace

Drupal\FunctionalJavascriptTests

Code

protected function getMinkDriverArgs() {
  if ($this->minkDefaultDriverClass === DrupalSelenium2Driver::class) {
    return getenv('MINK_DRIVER_ARGS_WEBDRIVER') ?: parent::getMinkDriverArgs();
  }
  return parent::getMinkDriverArgs();
}