You are here

public function ResponseTest::testCanSetHeaderAsArray in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/guzzlehttp/psr7/tests/ResponseTest.php \GuzzleHttp\Tests\Psr7\ResponseTest::testCanSetHeaderAsArray()

File

vendor/guzzlehttp/psr7/tests/ResponseTest.php, line 72

Class

ResponseTest
@covers GuzzleHttp\Psr7\MessageTrait @covers GuzzleHttp\Psr7\Response

Namespace

GuzzleHttp\Tests\Psr7

Code

public function testCanSetHeaderAsArray() {
  $r = new Response(200, [
    'foo' => [
      'baz ',
      ' bar ',
    ],
  ]);
  $this
    ->assertEquals('baz, bar', $r
    ->getHeaderLine('foo'));
  $this
    ->assertEquals([
    'baz',
    'bar',
  ], $r
    ->getHeader('foo'));
}