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

Breadcrumb

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

function WebAssert::cookieExists

Checks that specified cookie exists.

Parameters

string $name cookie name:

Return value

void

Throws

ExpectationException

1 call to WebAssert::cookieExists()
WebAssert::cookieEquals in vendor/behat/mink/src/WebAssert.php
Checks that specified cookie exists and its value equals to a given one.

File

vendor/behat/mink/src/WebAssert.php, line 125

Class

WebAssert
Mink web assertions tool.

Namespace

Behat\Mink

Code

public function cookieExists(string $name) {
    $message = sprintf('Cookie "%s" is not set, but should be.', $name);
    $this->assert($this->session
        ->getCookie($name) !== null, $message);
}

API Navigation

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