diff --git a/src/AuthHandler/Guzzle6AuthHandler.php b/src/AuthHandler/Guzzle6AuthHandler.php index 13f9ee59d..7e8a815c2 100644 --- a/src/AuthHandler/Guzzle6AuthHandler.php +++ b/src/AuthHandler/Guzzle6AuthHandler.php @@ -105,11 +105,6 @@ public function attachKey(ClientInterface $http, $key) private function createAuthHttp(ClientInterface $http) { - return new Client([ - 'base_uri' => $http->getConfig('base_uri'), - 'http_errors' => true, - 'verify' => $http->getConfig('verify'), - 'proxy' => $http->getConfig('proxy'), - ]); + return new Client(['http_errors' => true] + $http->getConfig()); } } diff --git a/tests/Google/ClientTest.php b/tests/Google/ClientTest.php index 391678423..963ea071b 100644 --- a/tests/Google/ClientTest.php +++ b/tests/Google/ClientTest.php @@ -997,14 +997,8 @@ public function testCredentialsOptionWithCredentialsLoader() $httpClient = $this->prophesize('GuzzleHttp\ClientInterface'); $httpClient->getConfig() - ->shouldBeCalledOnce() + ->shouldBeCalled() ->willReturn(['handler' => $handler->reveal()]); - $httpClient->getConfig('base_uri') - ->shouldBeCalledOnce(); - $httpClient->getConfig('verify') - ->shouldBeCalledOnce(); - $httpClient->getConfig('proxy') - ->shouldBeCalledOnce(); $httpClient->send(Argument::any(), Argument::any()) ->shouldNotBeCalled();