Completed
Push — master ( 737ce1...291bdd )
by Tobias
04:55
created

IntegrationTest::setUp()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 3
nc 2
nop 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\Geoip\Tests;
14
15
use Geocoder\IntegrationTest\ProviderIntegrationTest;
16
use Geocoder\Provider\Geoip\Geoip;
17
use Http\Client\HttpClient;
18
19
/**
20
 * @author Tobias Nyholm <[email protected]>
21
 */
22
class IntegrationTest extends ProviderIntegrationTest
23
{
24
    protected $testAddress = false;
25
    protected $testReverse = false;
26
    protected $testIpv6 = false;
27
    protected $testHttpProvider = false;
28
29
    protected function setUp()
30
    {
31
        if (!function_exists('geoip_record_by_name')) {
32
            $this->markTestSkipped('You have to install GeoIP.');
33
        }
34
    }
35
36
    protected function createProvider(HttpClient $httpClient)
37
    {
38
        return new Geoip();
39
    }
40
41
    protected function getCacheDir()
42
    {
43
        return __DIR__.'/.cached_responses';
44
    }
45
46
    protected function getApiKey()
47
    {
48
        return null;
49
    }
50
}
51