IntegrationTest::createProvider()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
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\OpenRouteService\Tests;
14
15
use Geocoder\IntegrationTest\ProviderIntegrationTest;
16
use Geocoder\Provider\OpenRouteService\OpenRouteService;
17
use Http\Client\HttpClient;
18
19
/**
20
 * @author Tobias Nyholm <[email protected]>
21
 */
22
class IntegrationTest extends ProviderIntegrationTest
23
{
24
    protected $skippedTests = [
25
        'testReverseQueryWithNoResults' => 'We weirdly find stuff here...',
26
    ];
27
28
    protected $testIpv4 = false;
29
30
    protected $testIpv6 = false;
31
32
    protected function createProvider(HttpClient $httpClient)
33
    {
34
        return new OpenRouteService($httpClient, $this->getApiKey());
35
    }
36
37
    protected function getCacheDir()
38
    {
39
        return __DIR__.'/.cached_responses';
40
    }
41
42
    protected function getApiKey()
43
    {
44
        return $_SERVER['OPEN_ROUTE_SERVICE_API_KEY'];
45
    }
46
}
47