Thanks to visit codestin.com
Credit goes to github.com

Skip to content

geocoder-php/provider-integration-tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Geocoder integration tests

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 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');
    }
}

About

Integration tests for Providers

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 9

Languages