geocoder-php/provider-integration-tests

Integration tests Geocoder provider

Package info

github.com/geocoder-php/provider-integration-tests

pkg:composer/geocoder-php/provider-integration-tests

Statistics

Installs: 202 665

Dependents: 64

Suggesters: 0

Stars: 0

Open Issues: 1

1.6.4 2024-03-02 12:18 UTC

Requires

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 0915ad911e258fc2138c8e253b291f15062bf065

geocodertestprovider

This package is auto-updated.

Last update: 2026-06-21 16:42:49 UTC


README

👁 Build Status
👁 Latest Stable Version
👁 Total Downloads
👁 Monthly Downloads
👁 Software License

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(): string;
 {
 return dirname(__DIR__).'/.cached_responses';
 }

 protected function getApiKey(): string;
 {
 return env('GOOGLE_API_KEY');
 }
}