function WebDriverTestBase::getMinkDriverArgs

Same name in other branches
  1. 9 core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php \Drupal\FunctionalJavascriptTests\WebDriverTestBase::getMinkDriverArgs()
  2. 10 core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php \Drupal\FunctionalJavascriptTests\WebDriverTestBase::getMinkDriverArgs()
  3. 11.x core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php \Drupal\FunctionalJavascriptTests\WebDriverTestBase::getMinkDriverArgs()

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\FunctionalJavascriptTests

Code

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();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.