IntegrationTest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 10
c 2
b 0
f 0
dl 0
loc 30
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getApiKey() 0 3 1
A createProvider() 0 3 1
A getCacheDir() 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 Danhunsaker\Geocoder\Provider\Mock\Tests;
12
13
use Geocoder\IntegrationTest\ProviderIntegrationTest;
14
use Danhunsaker\Geocoder\Provider\Mock\Mock;
15
use Http\Client\HttpClient;
16
17
/**
18
 * @author Tobias Nyholm <[email protected]>
19
 */
20
class IntegrationTest extends ProviderIntegrationTest
21
{
22
    /**
23
     * @var array with functionName => reason
24
     */
25
    protected $skippedTests = [
26
        'testExceptions' => 'Throwng exceptions is not supported by this provider',
27
    ];
28
29
    protected $testAddress = true;
30
31
    protected $testReverse = true;
32
33
    protected $testIpv4 = false;
34
35
    protected $testIpv6 = false;
36
37
    protected function createProvider(HttpClient $httpClient)
38
    {
39
        return new Mock($httpClient, [51.5033, -0.1276], ['streetNumber' => '10', 'streetName' => 'Downing St', 'locality' => 'London', 'countryCode' => 'UK']);
40
    }
41
42
    protected function getCacheDir()
43
    {
44
        return __DIR__.'/.cached_responses';
45
    }
46
47
    protected function getApiKey()
48
    {
49
        return null;
50
    }
51
}
52