public function WebAssert::cookieEquals in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/behat/mink/src/WebAssert.php \Behat\Mink\WebAssert::cookieEquals()
Checks that specified cookie exists and its value equals to a given one.
Parameters
string $name cookie name:
string $value cookie value:
Throws
File
- vendor/
behat/ mink/ src/ WebAssert.php, line 95
Class
- WebAssert
- Mink web assertions tool.
Namespace
Behat\MinkCode
public function cookieEquals($name, $value) {
$this
->cookieExists($name);
$actualValue = $this->session
->getCookie($name);
$message = sprintf('Cookie "%s" value is "%s", but should be "%s".', $name, $actualValue, $value);
$this
->assert($actualValue == $value, $message);
}