You are here

public function WebAssertTest::testResponseHeaderMatches in Zircon Profile 8

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

File

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

Class

WebAssertTest

Namespace

Behat\Mink\Tests

Code

public function testResponseHeaderMatches() {
  $this->session
    ->expects($this
    ->any())
    ->method('getResponseHeader')
    ->will($this
    ->returnValueMap(array(
    array(
      'foo',
      'bar',
    ),
    array(
      'bar',
      'baz',
    ),
  )));
  $this
    ->assertCorrectAssertion('responseHeaderMatches', array(
    'foo',
    '/ba(.*)/',
  ));
  $this
    ->assertWrongAssertion('responseHeaderMatches', array(
    'bar',
    '/b[^a]/',
  ), 'Behat\\Mink\\Exception\\ExpectationException', 'The pattern "/b[^a]/" was not found anywhere in the "bar" response header.');
}