Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. BrowserKitDriver.php

function 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 234

Class

BrowserKitDriver
Symfony BrowserKit driver.

Namespace

Behat\Mink\Driver

Code

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal