IntegrationTest::getCacheDir()   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 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