| Total Complexity | 5 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | class IntegrationTest extends ProviderIntegrationTest |
||
| 23 | { |
||
| 24 | protected $skippedTests = [ |
||
| 25 | ]; |
||
| 26 | |||
| 27 | protected $testAddress = false; |
||
| 28 | |||
| 29 | protected $testReverse = false; |
||
| 30 | |||
| 31 | protected $testIpv6 = false; |
||
| 32 | |||
| 33 | protected $testHttpProvider = false; |
||
| 34 | |||
| 35 | public static function setUpBeforeClass(): void |
||
| 36 | { |
||
| 37 | if (false == class_exists('\\IP2Location\\Database')) { |
||
|
|
|||
| 38 | self::markTestSkipped('The IP2Location\'s official library required to run these tests.'); |
||
| 39 | } |
||
| 40 | |||
| 41 | parent::setUpBeforeClass(); |
||
| 42 | } |
||
| 43 | |||
| 44 | protected function createProvider(HttpClient $httpClient) |
||
| 45 | { |
||
| 46 | // Download this BIN database from https://lite.ip2location.com/database/ip-country-region-city-latitude-longitude-zipcode |
||
| 47 | return new IP2LocationBinary(__DIR__.'/fixtures/IP2LOCATION-LITE-DB9.IPV6.BIN', \IP2Location\Database::FILE_IO); |
||
| 48 | } |
||
| 49 | |||
| 50 | protected function getCacheDir() |
||
| 53 | } |
||
| 54 | |||
| 55 | protected function getApiKey() |
||
| 60 |
When comparing two booleans, it is generally considered safer to use the strict comparison operator.