PHP code example of geocoder-php / provider-integration-tests
1. Go to this page and download the library: Download geocoder-php/provider-integration-tests library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
geocoder-php / provider-integration-tests example snippets
use Geocoder\IntegrationTest\ProviderIntegrationTest;
use Geocoder\Provider\GoogleMaps\GoogleMaps;
use Psr\Http\Client\ClientInterface;
class IntegrationTest extends ProviderIntegrationTest
{
protected function createProvider(ClientInterface $httpClient)
{
return new GoogleMaps($httpClient);
}
protected function getCacheDir(): string;
{
return dirname(__DIR__).'/.cached_responses';
}
protected function getApiKey(): string;
{
return env('GOOGLE_API_KEY');
}
}