/**
  *
  */
 public function testGetAddress()
 {
     $coordinates = new Coordinates();
     $coordinates->setLatitude(43.6190815)->setLongitude(3.9162419);
     $address = $this->getLocator('get-address-result.json')->locate($coordinates);
     $this->assertEquals('Sigean, Aude, France', $address->getFullAddress());
 }
 /**
  *
  */
 public function testLongitudeAccessors()
 {
     $longitude = rand();
     $coordinates = new Coordinates();
     $coordinates->setLongitude($longitude);
     $this->assertEquals($longitude, $coordinates->getLongitude());
 }
 /**
  *
  */
 public function testGetAddress()
 {
     $coordinates = new Coordinates();
     $coordinates->setLatitude(43.6184022)->setLongitude(3.9160665);
     $address = $this->getLocator('get-address-result.json')->locate($coordinates);
     $this->assertEquals('Rue de Thor, 34000 Montpellier, France', $address->getFullAddress());
 }
 /**
  *
  */
 public function testGetAddress()
 {
     $coordinates = new Coordinates();
     $coordinates->setLatitude(43.617545)->setLongitude(3.915586);
     $address = $this->getLocator('get-address-result.json')->locate($coordinates);
     $this->assertEquals('Rue de Thor, Montpellier, Hérault, Languedoc-Roussillon, France', $address->getFullAddress());
 }
 /**
  *
  */
 public function testGetAddress()
 {
     $coordinates = new Coordinates();
     $coordinates->setLatitude(43.6190815)->setLongitude(3.9162419);
     $address = $this->getLocator('get-address-result.json')->locate($coordinates);
     $this->assertEquals('640 Rue du Mas de Verchant, 34000 Montpellier, France', $address->getFullAddress());
 }
 /**
  *
  */
 public function testGetDistance()
 {
     $calculator = new DistanceCalculator();
     $paris = new Coordinates();
     $paris->setLatitude(48.856667)->setLongitude(2.350987);
     $lyon = new Coordinates();
     $lyon->setLatitude(45.767299)->setLongitude(4.834329);
     $this->assertEquals(391.613, $calculator->getDistance($paris, $lyon));
 }