You are here

public function ClientTest::testRequestSecureCookies in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/browser-kit/Tests/ClientTest.php \Symfony\Component\BrowserKit\Tests\ClientTest::testRequestSecureCookies()

File

vendor/symfony/browser-kit/Tests/ClientTest.php, line 275

Class

ClientTest

Namespace

Symfony\Component\BrowserKit\Tests

Code

public function testRequestSecureCookies() {
  $client = new TestClient();
  $client
    ->setNextResponse(new Response('<html><a href="/foo">foo</a></html>', 200, array(
    'Set-Cookie' => 'foo=bar; path=/; secure',
  )));
  $client
    ->request('GET', 'https://www.example.com/foo/foobar');
  $this
    ->assertTrue($client
    ->getCookieJar()
    ->get('foo', '/', 'www.example.com')
    ->isSecure());
}