geocoder-php/provider-integration-tests
Integration tests Geocoder provider
1.4.1
2019-02-06 11:51 UTC
Requires
- php: ^7.1
- phpunit/phpunit: ^7.5
- php-http/mock-client: ^1.2
- nyholm/psr7: ^1.0.0
Requires (Dev)
README
This repository contains integration tests to make sure your implementation of a Geocoder Provider is correct.
Install
composer require --dev geocoder-php/provider-integration-tests:dev-master
Use
Create a test that looks like this:
use Http\Client\HttpClient; use Geocoder\IntegrationTest\ProviderIntegrationTest; use Geocoder\Provider\GoogleMaps\GoogleMaps; class IntegrationTest extends ProviderIntegrationTest { protected function createProvider(HttpClient $httpClient) { return new GoogleMaps($httpClient); } protected function getCacheDir() { return dirname(__DIR__).'/.cached_responses'; } protected function getApiKey() { return env('GOOLE_API_KEY'); } }