Completed
Push — master ( a4f6ba...3014ff )
by Tobias
02:45
created

IntegrationTest::createProvider()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
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\LocationIQ\Tests;
12
13
use Geocoder\IntegrationTest\ProviderIntegrationTest;
14
use Geocoder\Provider\LocationIQ\LocationIQ;
15
use Http\Client\HttpClient;
16
17
/**
18
 * @author Srihari Thalla <[email protected]>
19
 */
20
class IntegrationTest extends ProviderIntegrationTest
21
{
22
    protected function createProvider(HttpClient $httpClient)
23
    {
24
        return new LocationIQ($httpClient, $this->getApiKey());
25
    }
26
27
    protected function getCacheDir()
28
    {
29
        return __DIR__.'/.cached_responses';
30
    }
31
32
    protected function getApiKey()
33
    {
34
        return $_SERVER['LOCATIONIQ_API_KEY'];
35
    }
36
}
37