You are here

public function ClientTest::testConvertsGuzzleHeadersToArrays in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/fabpot/goutte/Goutte/Tests/ClientTest.php \Goutte\Tests\ClientTest::testConvertsGuzzleHeadersToArrays()

File

vendor/fabpot/goutte/Goutte/Tests/ClientTest.php, line 323

Class

ClientTest
Goutte Client Test.

Namespace

Goutte\Tests

Code

public function testConvertsGuzzleHeadersToArrays() {
  $guzzle = $this
    ->getGuzzle([
    new GuzzleResponse(200, array(
      'Date' => 'Tue, 04 Jun 2013 13:22:41 GMT',
    )),
  ]);
  $client = new Client();
  $client
    ->setClient($guzzle);
  $client
    ->request('GET', 'http://www.example.com/');
  $response = $client
    ->getResponse();
  $headers = $response
    ->getHeaders();
  $this
    ->assertInternalType('array', array_shift($headers), 'Header not converted from Guzzle\\Http\\Message\\Header to array');
}