示例#1
0
 public function testExtractsHeaderLines()
 {
     $this->assertEquals(['bar', 'baz'], Core::headerLines(['headers' => ['Foo' => ['bar', 'baz']]], 'Foo'));
 }
示例#2
0
 public function testMaintainsMultiHeaderOrder()
 {
     Server::flush();
     Server::enqueue([['status' => 200, 'headers' => ['Content-Length' => ['0'], 'Foo' => ['a', 'b'], 'foo' => ['c', 'd']]]]);
     $a = new CurlMultiHandler();
     $response = $a(['http_method' => 'GET', 'headers' => ['Host' => [Server::$host]]])->wait();
     $this->assertEquals(['a', 'b', 'c', 'd'], Core::headerLines($response, 'Foo'));
 }