You are here

public function WebAssertTest::testCookieExists in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/behat/mink/tests/WebAssertTest.php \Behat\Mink\Tests\WebAssertTest::testCookieExists()

File

vendor/behat/mink/tests/WebAssertTest.php, line 148

Class

WebAssertTest

Namespace

Behat\Mink\Tests

Code

public function testCookieExists() {
  $this->session
    ->expects($this
    ->any())
    ->method('getCookie')
    ->will($this
    ->returnValueMap(array(
    array(
      'foo',
      '1',
    ),
    array(
      'bar',
      null,
    ),
  )));
  $this
    ->assertCorrectAssertion('cookieExists', array(
    'foo',
  ));
  $this
    ->assertWrongAssertion('cookieExists', array(
    'bar',
  ), 'Behat\\Mink\\Exception\\ExpectationException', 'Cookie "bar" is not set, but should be.');
}