-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expect a PSR-18 client instead of a PHP-HTTP client (#1110)
* Expect a PSR-18 client instead of a PHP-HTTP client * Update integration tests
- Loading branch information
Showing
2 changed files
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ | |
use Geocoder\Query\ReverseQuery; | ||
use Geocoder\Http\Provider\AbstractHttpProvider; | ||
use Geocoder\Provider\Provider; | ||
use Http\Client\HttpClient; | ||
use Psr\Http\Client\ClientInterface; | ||
|
||
/** | ||
* @author Vladimir Kalinkin <[email protected]> | ||
|
@@ -40,10 +40,10 @@ final class PickPoint extends AbstractHttpProvider implements Provider | |
private $apiKey; | ||
|
||
/** | ||
* @param HttpClient $client an HTTP adapter | ||
* @param string $apiKey an API key | ||
* @param ClientInterface $client an HTTP adapter | ||
* @param string $apiKey an API key | ||
*/ | ||
public function __construct(HttpClient $client, string $apiKey) | ||
public function __construct(ClientInterface $client, string $apiKey) | ||
{ | ||
if (empty($apiKey)) { | ||
throw new InvalidCredentials('No API key provided.'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,14 +12,14 @@ | |
|
||
use Geocoder\IntegrationTest\ProviderIntegrationTest; | ||
use Geocoder\Provider\PickPoint\PickPoint; | ||
use Http\Client\HttpClient; | ||
use Psr\Http\Client\ClientInterface; | ||
|
||
/** | ||
* @author Vladimir Kalinkin <[email protected]> | ||
*/ | ||
class IntegrationTest extends ProviderIntegrationTest | ||
{ | ||
protected function createProvider(HttpClient $httpClient) | ||
protected function createProvider(ClientInterface $httpClient) | ||
{ | ||
return new PickPoint($httpClient, $this->getApiKey()); | ||
} | ||
|