public function testGeocodeLookupAndReverse() { $this->skipIf(dns_check_record("google.com") === false, "No internet connection."); $address = '1600 Pennsylvania Avenue Northwest, Washington, DC'; foreach (array('osm') as $service) { $location = Geocoder::find($service, compact('address')); $expected = array('latitude' => 38, 'longitude' => -77); $this->assertEqual($expected, array_map('intval', $location->coordinates())); $address = Geocoder::find($service, $location->coordinates()); $this->assertTrue(is_object($address)); } }