public function testGetReversedDataWithRealCoordinates()
 {
     $provider = new MapQuestProvider(new \Geocoder\HttpAdapter\CurlHttpAdapter());
     $result = $provider->getReversedData(array(54.0484068, -2.7990345));
     $this->assertEquals(54.0484068, $result['latitude'], '', 0.001);
     $this->assertEquals(-2.7990345, $result['longitude'], '', 0.001);
     $this->assertNull($result['bounds']);
     $this->assertNull($result['streetNumber']);
     $this->assertEquals('Mary Street', $result['streetName']);
     $this->assertEquals('LA1 1LZ', $result['zipcode']);
     $this->assertEquals('Lancaster', $result['city']);
     $this->assertEquals('Lancashire', $result['county']);
     $this->assertEquals('England', $result['region']);
     $this->assertEquals('United Kingdom', $result['country']);
     $this->assertNull($result['countryCode']);
     $this->assertNull($result['timezone']);
 }
 public function testGetReversedDataWithRealCoordinates()
 {
     if (!isset($_SERVER['MAPQUEST_API_KEY'])) {
         $this->markTestSkipped('You need to configure the MAPQUEST_API_KEY value in phpunit.xml');
     }
     $provider = new MapQuestProvider($this->getAdapter(), $_SERVER['MAPQUEST_API_KEY']);
     $result = $provider->getReversedData(array(54.0484068, -2.7990345));
     $this->assertInternalType('array', $result);
     $this->assertCount(1, $result);
     $result = $result[0];
     $this->assertInternalType('array', $result);
     $this->assertEquals(54.0484068, $result['latitude'], '', 0.001);
     $this->assertEquals(-2.7990345, $result['longitude'], '', 0.001);
     $this->assertNull($result['bounds']);
     $this->assertNull($result['streetNumber']);
     $this->assertEquals('Mary Street', $result['streetName']);
     $this->assertEquals('LA1 1LZ', $result['zipcode']);
     $this->assertEquals('Lancaster', $result['city']);
     $this->assertEquals('Lancashire', $result['county']);
     $this->assertEquals('England', $result['region']);
     $this->assertEquals('GB', $result['country']);
     $this->assertNull($result['countryCode']);
     $this->assertNull($result['timezone']);
 }