public function testGeocodedDataWithGeocoderRequest() { $request = new GeocoderRequest(); $request->setAddress('Paris'); $request->setBound(48.815573, 2.224199, 48.9021449, 2.4699208); $request->setRegion('FR'); $request->setLanguage('PL'); $response = $this->geocoderProvider->getGeocodedData($request); $this->assertInstanceOf('Ivory\\GoogleMap\\Services\\Geocoding\\Result\\GeocoderResponse', $response); $this->assertNotEmpty($response->getResults()); $this->assertSame(GeocoderStatus::OK, $response->getStatus()); }
/** * @expectedException \Ivory\GoogleMap\Exception\GeocodingException * @expectedExceptionMessage The geocoder request region must be a string with two characters. */ public function testRegionWithInvalidValue() { $this->geocoderRequest->setRegion('foo'); }