You are here

public function HeaderTest::testHeaders in Zircon Profile 8.0

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

File

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

Class

HeaderTest

Namespace

Behat\Mink\Tests\Driver\Basic

Code

public function testHeaders() {
  $this
    ->getSession()
    ->setRequestHeader('Accept-Language', 'fr');
  $this
    ->getSession()
    ->visit($this
    ->pathTo('/headers.php'));
  $this
    ->assertContains('[HTTP_ACCEPT_LANGUAGE] => fr', $this
    ->getSession()
    ->getPage()
    ->getContent());
}