1313
1414class GeocodingEndpointTest extends AbstractTest
1515{
16- public function testGeocodingGetCoordinatesByLocationName ()
16+ public function testGeocodingGetByLocationName ()
1717 {
1818 $ this ->mockHttpClient ->addResponse (
1919 new Response (
@@ -22,17 +22,17 @@ public function testGeocodingGetCoordinatesByLocationName()
2222 )
2323 );
2424
25- $ response = $ this ->getApi ()->getGeocoding ()->getCoordinatesByLocationName ('lisbon, pt ' );
25+ $ response = $ this ->getApi ()->getGeocoding ()->getByLocationName ('lisbon, pt ' );
2626 $ this ->assertLocationListResponse ($ response );
2727 }
2828
29- public function testGeocodingGetCoordinatesByLocationNameWithBlankValue ()
29+ public function testGeocodingGetByLocationNameWithBlankValue ()
3030 {
3131 $ this ->expectException (ValidationException::class);
32- $ this ->getApi ()->getGeocoding ()->getCoordinatesByLocationName ('' );
32+ $ this ->getApi ()->getGeocoding ()->getByLocationName ('' );
3333 }
3434
35- public function testGeocodingGetCoordinatesByZipCode ()
35+ public function testGeocodingGetByZipCode ()
3636 {
3737 $ this ->mockHttpClient ->addResponse (
3838 new Response (
@@ -41,7 +41,7 @@ public function testGeocodingGetCoordinatesByZipCode()
4141 )
4242 );
4343
44- $ response = $ this ->getApi ()->getGeocoding ()->getCoordinatesByZipCode ('1000-001 ' , 'pt ' );
44+ $ response = $ this ->getApi ()->getGeocoding ()->getByZipCode ('1000-001 ' , 'pt ' );
4545 $ this ->assertInstanceOf (ZipCodeLocation::class, $ response );
4646
4747 $ this ->assertSame ('1000-001 ' , $ response ->getZipCode ());
@@ -54,20 +54,20 @@ public function testGeocodingGetCoordinatesByZipCode()
5454 $ this ->assertSame (-9.1333 , $ coordinate ->getLongitude ());
5555 }
5656
57- #[DataProvider('provideGeocodingGetCoordinatesByZipCodeWithBlankValueData ' )]
58- public function testGeocodingGetCoordinatesByZipCodeWithBlankValue (string $ zipCode , string $ countryCode )
57+ #[DataProvider('provideGeocodingGetByZipCodeWithBlankValueData ' )]
58+ public function testGeocodingGetByZipCodeWithBlankValue (string $ zipCode , string $ countryCode )
5959 {
6060 $ this ->expectException (ValidationException::class);
61- $ this ->getApi ()->getGeocoding ()->getCoordinatesByZipCode ($ zipCode , $ countryCode );
61+ $ this ->getApi ()->getGeocoding ()->getByZipCode ($ zipCode , $ countryCode );
6262 }
6363
64- public static function provideGeocodingGetCoordinatesByZipCodeWithBlankValueData (): \Generator
64+ public static function provideGeocodingGetByZipCodeWithBlankValueData (): \Generator
6565 {
6666 yield 'blank zip code ' => ['' , 'pt ' ];
6767 yield 'blank country code ' => ['1000-100 ' , '' ];
6868 }
6969
70- public function testGeocodingGetLocationNameByCoordinates ()
70+ public function testGeocodingGetByCoordinate ()
7171 {
7272 $ this ->mockHttpClient ->addResponse (
7373 new Response (
@@ -76,29 +76,29 @@ public function testGeocodingGetLocationNameByCoordinates()
7676 )
7777 );
7878
79- $ response = $ this ->getApi ()->getGeocoding ()->getLocationNameByCoordinates (38.7077507 , -9.1365919 );
79+ $ response = $ this ->getApi ()->getGeocoding ()->getByCoordinate (38.7077507 , -9.1365919 );
8080 $ this ->assertLocationListResponse ($ response );
8181 }
8282
8383 #[DataProviderExternal(InvalidParamDataProvider::class, 'provideInvalidCoordinateData ' )]
84- public function testGeocodingGetLocationNameByCoordinatesWithInvalidCoordinate (
84+ public function testGeocodingGetByCoordinateWithInvalidCoordinate (
8585 float $ latitude ,
8686 float $ longitude ,
8787 string $ expectedException
8888 )
8989 {
9090 $ this ->expectException ($ expectedException );
91- $ this ->getApi ()->getGeocoding ()->getLocationNameByCoordinates ($ latitude , $ longitude );
91+ $ this ->getApi ()->getGeocoding ()->getByCoordinate ($ latitude , $ longitude );
9292 }
9393
9494 #[DataProviderExternal(InvalidParamDataProvider::class, 'provideInvalidNumResultsData ' )]
95- public function testGeocodingGetLocationNameByCoordinatesWithInvalidNumResults (
95+ public function testGeocodingGetByCoordinateWithInvalidNumResults (
9696 int $ numResults ,
9797 string $ expectedException
9898 )
9999 {
100100 $ this ->expectException ($ expectedException );
101- $ this ->getApi ()->getGeocoding ()->getLocationNameByCoordinates (38.7077507 , -9.1365919 , $ numResults );
101+ $ this ->getApi ()->getGeocoding ()->getByCoordinate (38.7077507 , -9.1365919 , $ numResults );
102102 }
103103
104104 /**
0 commit comments