Completed
Push — master ( 3e7e88...cdbc34 )
by Tobias
04:55
created

IntegrationTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 4
dl 0
loc 24
rs 10
c 0
b 0
f 0
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\GeoIP2\Tests;
14
15
use Geocoder\IntegrationTest\ProviderIntegrationTest;
16
use Geocoder\Provider\GeoIP2\GeoIP2;
17
use Geocoder\Provider\GeoIP2\GeoIP2Adapter;
18
use GeoIp2\Database\Reader;
19
use Http\Client\HttpClient;
20
21
/**
22
 * @author Tobias Nyholm <[email protected]>
23
 */
24
class IntegrationTest extends ProviderIntegrationTest
25
{
26
    protected $testAddress = false;
27
    protected $testReverse = false;
28
    protected $testIpv6 = false;
29
    protected $testHttpProvider = false;
30
31
    protected function createProvider(HttpClient $httpClient)
32
    {
33
        $reader = new Reader(__DIR__.'/fixtures/GeoLite2-City.mmdb');
34
35
        return new GeoIP2(new GeoIP2Adapter($reader));
36
    }
37
38
    protected function getCacheDir()
39
    {
40
        return __DIR__.'/.cached_responses';
41
    }
42
43
    protected function getApiKey()
44
    {
45
        return null;
46
    }
47
}
48