public function ClientTest::testCustomUserAgent in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/fabpot/goutte/Goutte/Tests/ClientTest.php \Goutte\Tests\ClientTest::testCustomUserAgent()
File
- vendor/
fabpot/ goutte/ Goutte/ Tests/ ClientTest.php, line 73
Class
- ClientTest
- Goutte Client Test.
Namespace
Goutte\TestsCode
public function testCustomUserAgent() {
$guzzle = $this
->getGuzzle();
$client = new Client();
$client
->setClient($guzzle);
$client
->setHeader('User-Agent', 'foo');
$client
->request('GET', 'http://www.example.com/');
$this
->assertEquals('Symfony2 BrowserKit, foo', end($this->history)['request']
->getHeaderLine('User-Agent'));
}