You are here

public function HeaderTest::testResponseHeaders in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/behat/mink/driver-testsuite/tests/Basic/HeaderTest.php \Behat\Mink\Tests\Driver\Basic\HeaderTest::testResponseHeaders()

File

vendor/behat/mink/driver-testsuite/tests/Basic/HeaderTest.php, line 65

Class

HeaderTest

Namespace

Behat\Mink\Tests\Driver\Basic

Code

public function testResponseHeaders() {
  $this
    ->getSession()
    ->visit($this
    ->pathTo('/response_headers.php'));
  $headers = $this
    ->getSession()
    ->getResponseHeaders();
  $lowercasedHeaders = array();
  foreach ($headers as $name => $value) {
    $lowercasedHeaders[str_replace('_', '-', strtolower($name))] = $value;
  }
  $this
    ->assertArrayHasKey('x-mink-test', $lowercasedHeaders);
}