public function ClientTest::testUsesAuth in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/fabpot/goutte/Goutte/Tests/ClientTest.php \Goutte\Tests\ClientTest::testUsesAuth()
File
- vendor/
fabpot/ goutte/ Goutte/ Tests/ ClientTest.php, line 83
Class
- ClientTest
- Goutte Client Test.
Namespace
Goutte\TestsCode
public function testUsesAuth() {
$guzzle = $this
->getGuzzle();
$client = new Client();
$client
->setClient($guzzle);
$client
->setAuth('me', '**');
$client
->request('GET', 'http://www.example.com/');
$request = end($this->history)['request'];
$this
->assertEquals('Basic bWU6Kio=', $request
->getHeaderLine('Authorization'));
}