IntegrationTest::getApiKey()   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 0
dl 0
loc 3
rs 10
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