| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | public function testGetCountryWithoutGeoIpModule() |
||
| 27 | { |
||
| 28 | if (!function_exists("geoip_country_code_by_name")) { |
||
| 29 | $adapter = new DefaultLookupAdapter(); |
||
| 30 | $chIp = "194.150.248.201"; |
||
| 31 | $this->assertEquals("CH",$adapter->getCountry($chIp), "$chIp should be in Switzerland => CH"); |
||
| 32 | } else { |
||
| 33 | throw new \InvalidArgumentException("It seems, the geo-ip extension is installed, so this test doesn't make sense."); |
||
| 34 | } |
||
| 35 | |||
| 36 | } |
||
| 37 | } |
||
| 38 |