function WebDriverTestBaseTest::testChromeOptions
Tests "chromeOptions" deprecation.
@group legacy
@covers ::getMinkDriverArgs
File
-
core/
tests/ Drupal/ Tests/ Core/ Test/ WebDriverTestBaseTest.php, line 67
Class
- WebDriverTestBaseTest
- @coversDefaultClass \Drupal\FunctionalJavascriptTests\WebDriverTestBase @group Test @runTestsInSeparateProcesses
Namespace
Drupal\Tests\Core\TestCode
public function testChromeOptions() : void {
$this->expectDeprecation('The "chromeOptions" array key is deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use "goog:chromeOptions instead. See https://www.drupal.org/node/3422624');
putenv('MINK_DRIVER_ARGS_WEBDRIVER=["chrome",{"browserName":"chrome","chromeOptions":{"args":["--headless"]}},"http://localhost:4444"]');
$object = new class ('test') extends WebDriverTestBase {
};
$method = new \ReflectionMethod($object, 'getMinkDriverArgs');
$this->assertSame('["chrome",{"browserName":"chrome","goog:chromeOptions":{"args":["--headless"],"w3c":false}},"http:\\/\\/localhost:4444"]', $method->invoke($object));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.