geocoder-php /
photon-provider
| 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 Geocoder\Provider\Photon\Tests; |
||
| 12 | |||
| 13 | use Geocoder\IntegrationTest\ProviderIntegrationTest; |
||
| 14 | use Geocoder\Provider\Photon\Photon; |
||
| 15 | use Http\Client\HttpClient; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @author Tobias Nyholm <[email protected]> |
||
| 19 | */ |
||
| 20 | class IntegrationTest extends ProviderIntegrationTest |
||
| 21 | { |
||
| 22 | protected $testAddress = true; |
||
| 23 | |||
| 24 | protected $testReverse = true; |
||
| 25 | |||
| 26 | protected $testIpv4 = false; |
||
| 27 | |||
| 28 | protected $testIpv6 = false; |
||
| 29 | |||
| 30 | protected $skippedTests = [ |
||
| 31 | 'testGeocodeQuery' => 'Photon API returns "Great George Street" for "10 Downing St, London, UK" query.', |
||
| 32 | 'testReverseQueryWithNoResults' => 'Photon API returns "Atlas Buoy 0.00E 0.00N" for reverse query at 0,0.', |
||
| 33 | ]; |
||
| 34 | |||
| 35 | protected function createProvider(HttpClient $httpClient) |
||
| 36 | { |
||
| 37 | return Photon::withKomootServer($httpClient, 'Geocoder PHP/Photon Provider/Integration Test'); |
||
|
0 ignored issues
–
show
|
|||
| 38 | } |
||
| 39 | |||
| 40 | protected function getCacheDir() |
||
| 41 | { |
||
| 42 | return __DIR__.'/.cached_responses'; |
||
| 43 | } |
||
| 44 | |||
| 45 | protected function getApiKey() |
||
| 46 | { |
||
| 47 | return null; |
||
| 48 | } |
||
| 49 | } |
||
| 50 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.