You are here

public function CookieJarTest::testUpdateFromResponse in Zircon Profile 8

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

File

vendor/symfony/browser-kit/Tests/CookieJarTest.php, line 61

Class

CookieJarTest

Namespace

Symfony\Component\BrowserKit\Tests

Code

public function testUpdateFromResponse() {
  $response = new Response('', 200, array(
    'Set-Cookie' => 'foo=foo',
  ));
  $cookieJar = new CookieJar();
  $cookieJar
    ->updateFromResponse($response);
  $this
    ->assertEquals('foo', $cookieJar
    ->get('foo')
    ->getValue(), '->updateFromResponse() updates cookies from a Response objects');
}