public function HeaderTest::testResetHeaders in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/behat/mink/driver-testsuite/tests/Basic/HeaderTest.php \Behat\Mink\Tests\Driver\Basic\HeaderTest::testResetHeaders()
File
- vendor/
behat/ mink/ driver-testsuite/ tests/ Basic/ HeaderTest.php, line 40
Class
Namespace
Behat\Mink\Tests\Driver\BasicCode
public function testResetHeaders() {
$session = $this
->getSession();
$session
->setRequestHeader('X-Mink-Test', 'test');
$session
->visit($this
->pathTo('/headers.php'));
$this
->assertContains('[HTTP_X_MINK_TEST] => test', $session
->getPage()
->getContent(), 'The custom header should be sent', true);
$session
->reset();
$session
->visit($this
->pathTo('/headers.php'));
$this
->assertNotContains('[HTTP_X_MINK_TEST] => test', $session
->getPage()
->getContent(), 'The custom header should not be sent after resetting', true);
}