You are here

public function GoutteDriver::reset in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/behat/mink-goutte-driver/src/GoutteDriver.php \Behat\Mink\Driver\GoutteDriver::reset()

Resets driver state.

This should reset cookies, request headers and basic authentication. When possible, the history should be reset as well, but this is not enforced as some implementations may not be able to reset it without restarting the driver entirely. Consumers requiring a clean history should restart the driver to enforce it.

Once reset, the driver should be ready to visit a page. Calling any action before visiting a page is an undefined behavior. The only supported method calls on a fresh driver are

  • visit()
  • setRequestHeader()
  • setBasicAuth()
  • reset()
  • stop()

Calling reset on a stopped driver is an undefined behavior.

Overrides BrowserKitDriver::reset

File

vendor/behat/mink-goutte-driver/src/GoutteDriver.php, line 62

Class

GoutteDriver
Goutte driver.

Namespace

Behat\Mink\Driver

Code

public function reset() {
  parent::reset();
  $this
    ->getClient()
    ->resetAuth();
}