You are here

public function ClientTest::testResetsAuth in Zircon Profile 8.0

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

File

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

Class

ClientTest
Goutte Client Test.

Namespace

Goutte\Tests

Code

public function testResetsAuth() {
  $guzzle = $this
    ->getGuzzle();
  $client = new Client();
  $client
    ->setClient($guzzle);
  $client
    ->setAuth('me', '**');
  $client
    ->resetAuth();
  $client
    ->request('GET', 'http://www.example.com/');
  $request = end($this->history)['request'];
  $this
    ->assertEquals('', $request
    ->getHeaderLine('authorization'));
}