geocoder-php / provider-integration-tests
Integration tests Geocoder provider
Installs: 63 177
Dependents: 63
Suggesters: 0
Security: 0
Stars: 0
Watchers: 6
Forks: 4
Open Issues: 0
Requires
- php: ^7.3 || ^8.0
- nyholm/psr7: ^1.0
- php-http/mock-client: ^1.2
- phpunit/phpunit: ^9.5
- psr/http-client: ^1.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 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() { return dirname(__DIR__).'/.cached_responses'; } protected function getApiKey() { return env('GOOLE_API_KEY'); } }