Ejemplo n.º 1
0
 /**
  * Test the faster geo call
  */
 public function testGeoDetails()
 {
     $ipinfo = new Ipinfo();
     $expected = new Host(array("city" => "Mountain View", "country" => "US", "ip" => "8.8.8.8", "loc" => "37.3860,-122.0838", "postal" => "94035", "region" => "California", "hostname" => "", "org" => "", "phone" => ""));
     $actual = $ipinfo->getIpGeoDetails("8.8.8.8");
     $this->assertEquals($expected, $actual);
 }
Ejemplo n.º 2
0
 /**
  * Test the faster geo call.
  */
 public function testGeoDetails()
 {
     $ipinfo = new Ipinfo();
     $expected = new Host(array('city' => 'Mountain View', 'country' => 'US', 'ip' => '8.8.8.8', 'loc' => '37.3860,-122.0838', 'postal' => '94035', 'region' => 'California', 'hostname' => '', 'org' => '', 'phone' => ''));
     $actual = $ipinfo->getIpGeoDetails('8.8.8.8');
     $this->assertEquals($expected, $actual);
 }