You are here

public function WebAssert::cookieExists in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/behat/mink/src/WebAssert.php \Behat\Mink\WebAssert::cookieExists()

Checks that specified cookie exists.

Parameters

string $name cookie name:

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 112

Class

WebAssert
Mink web assertions tool.

Namespace

Behat\Mink

Code

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