IntegrationTest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
c 1
b 0
f 0
dl 0
loc 26
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getCacheDir() 0 3 1
A getApiKey() 0 3 1
A createProvider() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Geocoder package.
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10
 * @license    MIT License
11
 */
12
13
namespace Geocoder\Provider\Pelias\Tests;
14
15
use Geocoder\IntegrationTest\ProviderIntegrationTest;
16
use Geocoder\Provider\Pelias\Pelias;
17
use Http\Client\HttpClient;
18
19
/**
20
 * @author Tobias Nyholm <[email protected]>
21
 */
22
class IntegrationTest extends ProviderIntegrationTest
23
{
24
    protected $skippedTests = [
25
        'testGeocodeQuery' => 'No Pelias "default" instance.',
26
        'testGeocodeQueryWithNoResults' => 'No Pelias "default" instance.',
27
        'testReverseQuery' => 'No Pelias "default" instance.',
28
        'testReverseQueryWithNoResults' => 'No Pelias "default" instance.',
29
    ];
30
31
    protected $testIpv4 = false;
32
33
    protected $testIpv6 = false;
34
35
    protected function createProvider(HttpClient $httpClient)
36
    {
37
        return new Pelias($httpClient, 'http://localhost/');
38
    }
39
40
    protected function getCacheDir()
41
    {
42
        return __DIR__.'/.cached_responses';
43
    }
44
45
    protected function getApiKey()
46
    {
47
        return null;
48
    }
49
}
50