public function ResponseHeaderBagTest::testToStringDoesntMessUpHeaders

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ResponseHeaderBagTest.php, line 238

Class

ResponseHeaderBagTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testToStringDoesntMessUpHeaders() {
  $headers = new ResponseHeaderBag();
  $headers
    ->set('Location', 'http://www.symfony.com');
  $headers
    ->set('Content-type', 'text/html');
  (string) $headers;
  $allHeaders = $headers
    ->allPreserveCase();
  $this
    ->assertEquals(array(
    'http://www.symfony.com',
  ), $allHeaders['Location']);
  $this
    ->assertEquals(array(
    'text/html',
  ), $allHeaders['Content-type']);
}