function UpdatePathTestBase::initFrontPage

Same name and namespace in other branches
  1. 9 core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php \Drupal\FunctionalTests\Update\UpdatePathTestBase::initFrontPage()
  2. 8.9.x core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php \Drupal\FunctionalTests\Update\UpdatePathTestBase::initFrontPage()
  3. 11.x core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php \Drupal\FunctionalTests\Update\UpdatePathTestBase::initFrontPage()

Visits the front page when initializing Mink.

According to the W3C WebDriver specification a cookie can only be set if the cookie domain is equal to the domain of the active document. When the browser starts up the active document is not our domain but 'about:blank' or similar. To be able to set our User-Agent and Xdebug cookies at the start of the test we now do a request to the front page so the active document matches the domain.

Overrides BrowserTestBase::initFrontPage

File

core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php, line 160

Class

UpdatePathTestBase
Provides a base class for writing an update test.

Namespace

Drupal\FunctionalTests\Update

Code

protected function initFrontPage() {
  // Do nothing as Drupal is not installed yet.
}

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