IntegrationTest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A createProvider() 0 3 1
A getCacheDir() 0 3 1
A getApiKey() 0 3 1
1
<?php
2
3
/*
4
 * This file is part of the Geocoder package.
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 *
8
 * @license    MIT License
9
 */
10
11
namespace Geocoder\Provider\MapTiler\Tests;
12
13
use Geocoder\IntegrationTest\ProviderIntegrationTest;
14
use Geocoder\Provider\MapTiler\MapTiler;
15
use Psr\Http\Client\ClientInterface;
16
17
/**
18
 * @author Jonathan Beliën
19
 */
20
class IntegrationTest extends ProviderIntegrationTest
21
{
22
    protected bool $testAddress = true;
23
24
    protected bool $testReverse = true;
25
26
    protected bool $testIpv4 = false;
27
28
    protected bool $testIpv6 = false;
29
30
    protected array $skippedTests = [];
31
32
    protected function createProvider(ClientInterface $httpClient)
33
    {
34
        return new MapTiler($httpClient, $this->getApiKey());
35
    }
36
37
    protected function getCacheDir(): string
38
    {
39
        return __DIR__.'/.cached_responses';
40
    }
41
42
    protected function getApiKey(): string
43
    {
44
        return $_SERVER['MAPTILER_KEY'];
45
    }
46
}
47