You are here

public function ResponseHeaderBagTest::testToStringDoesntMessUpHeaders in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/Tests/ResponseHeaderBagTest.php \Symfony\Component\HttpFoundation\Tests\ResponseHeaderBagTest::testToStringDoesntMessUpHeaders()

File

vendor/symfony/http-foundation/Tests/ResponseHeaderBagTest.php, line 259

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']);
}