protected function WebDriverTestBase::getMinkDriverArgs in Drupal 8
Same name and namespace in other branches
- 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 126
Class
- WebDriverTestBase
- Runs a browser test using a driver that supports Javascript.
Namespace
Drupal\FunctionalJavascriptTestsCode
protected function getMinkDriverArgs() {
if ($this->minkDefaultDriverClass === DrupalSelenium2Driver::class) {
return getenv('MINK_DRIVER_ARGS_WEBDRIVER') ?: getenv('MINK_DRIVER_ARGS_PHANTOMJS') ?: parent::getMinkDriverArgs();
}
elseif ($this->minkDefaultDriverClass === PhantomJSDriver::class) {
return getenv('MINK_DRIVER_ARGS_PHANTOMJS') ?: parent::getMinkDriverArgs();
}
return parent::getMinkDriverArgs();
}