public function ClientTest::testRequestCookies in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/browser-kit/Tests/ClientTest.php \Symfony\Component\BrowserKit\Tests\ClientTest::testRequestCookies()
File
- vendor/
symfony/ browser-kit/ Tests/ ClientTest.php, line 264
Class
Namespace
Symfony\Component\BrowserKit\TestsCode
public function testRequestCookies() {
$client = new TestClient();
$client
->setNextResponse(new Response('<html><a href="/foo">foo</a></html>', 200, array(
'Set-Cookie' => 'foo=bar',
)));
$client
->request('GET', 'http://www.example.com/foo/foobar');
$this
->assertEquals(array(
'foo' => 'bar',
), $client
->getCookieJar()
->allValues('http://www.example.com/foo/foobar'), '->request() updates the CookieJar');
$client
->request('GET', 'bar');
$this
->assertEquals(array(
'foo' => 'bar',
), $client
->getCookieJar()
->allValues('http://www.example.com/foo/foobar'), '->request() updates the CookieJar');
}