You are here

private function BrowserKitDriver::deleteCookie in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/behat/mink-browserkit-driver/src/BrowserKitDriver.php \Behat\Mink\Driver\BrowserKitDriver::deleteCookie()

Deletes a cookie by name.

Parameters

string $name Cookie name.:

1 call to BrowserKitDriver::deleteCookie()
BrowserKitDriver::setCookie in vendor/behat/mink-browserkit-driver/src/BrowserKitDriver.php
Sets cookie.

File

vendor/behat/mink-browserkit-driver/src/BrowserKitDriver.php, line 248

Class

BrowserKitDriver
Symfony2 BrowserKit driver.

Namespace

Behat\Mink\Driver

Code

private function deleteCookie($name) {
  $path = $this
    ->getCookiePath();
  $jar = $this->client
    ->getCookieJar();
  do {
    if (null !== $jar
      ->get($name, $path)) {
      $jar
        ->expire($name, $path);
    }
    $path = preg_replace('/.$/', '', $path);
  } while ($path);
}