geocoder-php/provider-integration-tests
Integration test suite for Geocoder PHP providers. Shared tests and fixtures to validate provider implementations and ensure consistent behavior across services, making it easier to verify compliance and prevent regressions.
This repository contains integration tests to make sure your implementation of a Geocoder Provider is correct.
composer require --dev geocoder-php/provider-integration-tests:dev-master
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(): string;
{
return dirname(__DIR__).'/.cached_responses';
}
protected function getApiKey(): string;
{
return env('GOOGLE_API_KEY');
}
}
How can I help you explore Laravel packages today?