reverse() public method

{@inheritDoc}
public reverse ( $latitude, $longitude )
Example #1
0
 public function testReverseWithRealCoordinatesWithHttps()
 {
     $provider = new ArcGISOnline($this->getAdapter(), null, true);
     $results = $provider->reverse(48.86327999700046, 2.3890199980004354);
     $this->assertInstanceOf('Geocoder\\Model\\AddressCollection', $results);
     $this->assertCount(1, $results);
     /** @var \Geocoder\Model\Address $result */
     $result = $results->first();
     $this->assertInstanceOf('\\Geocoder\\Model\\Address', $result);
     $this->assertEquals(48.86327999700046, $result->getLatitude(), '', 0.0001);
     $this->assertEquals(2.3890199980004354, $result->getLongitude(), '', 0.0001);
     $this->assertNull($result->getStreetNumber());
     $this->assertEquals('3 Avenue Gambetta', $result->getStreetName());
     $this->assertEquals(75020, $result->getPostalCode());
     $this->assertEquals('Paris', $result->getLocality());
     $this->assertEquals('FRA', $result->getCountry()->getCode());
     $this->assertFalse($result->getBounds()->isDefined());
     $this->assertNull($result->getSubLocality());
     $this->assertEmpty($result->getAdminLevels());
     $this->assertNull($result->getCountry()->getName());
     $this->assertNull($result->getTimezone());
 }