/**
  * @return \Ivory\GoogleMap\Services\DistanceMatrix\DistanceMatrixResponse
  * @throws \Ivory\GoogleMap\Exception\DistanceMatrixException
  *
  * Description : calculate distance between to points
  */
 private function rangeCalculus()
 {
     $distanceMatrix = new DistanceMatrix(new CurlHttpAdapter());
     $address = $this->getCurrentUserAddress();
     $dest = $this->getContactAddress();
     $request = new DistanceMatrixRequest();
     $origin = array_map('current', $address);
     $request->setOrigins($origin);
     $request->setDestinations(array('20 rue Marceau, Paris, France'));
     $response = $distanceMatrix->process($request);
     return $response;
 }
 /**
  * @expectedException \Ivory\GoogleMap\Exception\ServiceException
  * @expectedExceptionMessage An error occured while fetching
  */
 public function testProcessThrowsInvalidResponse()
 {
     $this->service->process(array('Vancouver BC' . str_repeat('a', 2000)), array('San Francisco'));
 }