Beispiel #1
0
 public function testGetGeocodedDataWithAnotherIp()
 {
     $provider = new HostIpProvider(new \Geocoder\HttpAdapter\CurlHttpAdapter());
     $result = $provider->getGeocodedData('33.33.33.22');
     $this->assertNull($result['latitude']);
     $this->assertNull($result['longitude']);
 }
 public function testGetGeocodedDataWithAnotherIp()
 {
     $provider = new HostIpProvider($this->getAdapter());
     $result = $provider->getGeocodedData('33.33.33.22');
     $this->assertInternalType('array', $result);
     $this->assertCount(1, $result);
     $result = $result[0];
     $this->assertInternalType('array', $result);
     $this->assertNull($result['latitude']);
     $this->assertNull($result['longitude']);
 }