You are here

public function HeaderTest::testSetUserAgent 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::testSetUserAgent()

File

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

Class

HeaderTest

Namespace

Behat\Mink\Tests\Driver\Basic

Code

public function testSetUserAgent() {
  $session = $this
    ->getSession();
  $session
    ->setRequestHeader('user-agent', 'foo bar');
  $session
    ->visit($this
    ->pathTo('/headers.php'));
  $this
    ->assertContains('[HTTP_USER_AGENT] => foo bar', $session
    ->getPage()
    ->getContent());
}