IntegrationTest::createProvider()   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 1
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
use Geocoder\IntegrationTest\ProviderIntegrationTest;
12
13
class IntegrationTest extends ProviderIntegrationTest
14
{
15
    protected $skippedTests = [
16
        'testReverseQueryWithNoResults' => 'AzureMaps API returns "position":"0.000000,0.000000" for reverse query at 0,0.',
17
    ];
18
19
    /**
20
     * @return \Geocoder\Provider\Provider that is used in the tests
21
     */
22
    protected function createProvider(Http\Client\HttpClient $httpClient)
23
    {
24
        return new \Geocoder\Provider\AzureMaps\AzureMaps($httpClient, $_SERVER['AZURE_MAPS_SUBSCRIPTION_KEY']);
25
    }
26
27
    /**
28
     * @return string the directory where cached responses are stored
29
     */
30
    protected function getCacheDir()
31
    {
32
        return __DIR__.'/.cached_responses';
33
    }
34
35
    /**
36
     * @return string the API key or substring to be removed from cache
37
     */
38
    protected function getApiKey()
39
    {
40
        return $_SERVER['AZURE_MAPS_SUBSCRIPTION_KEY'];
41
    }
42
}
43