You are here

public function ClientTest::testUsesCustomHeaders in Zircon Profile 8.0

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

File

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

Class

ClientTest
Goutte Client Test.

Namespace

Goutte\Tests

Code

public function testUsesCustomHeaders() {
  $guzzle = $this
    ->getGuzzle();
  $client = new Client();
  $client
    ->setClient($guzzle);
  $client
    ->setHeader('X-Test', 'test');
  $client
    ->request('GET', 'http://www.example.com/');
  $this
    ->assertEquals('test', end($this->history)['request']
    ->getHeaderLine('X-Test'));
}