Skip to content

Commit 7295453

Browse files
committed
update test methods names
1 parent 73c26a8 commit 7295453

17 files changed

+196
-196
lines changed

tests/Geocoder/Tests/Provider/ArcGISOnlineTest.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function testGetName()
1616
/**
1717
* @expectedException \Geocoder\Exception\NoResult
1818
*/
19-
public function testGetGeocodedDataWithInvalidData()
19+
public function testGeocodeWithInvalidData()
2020
{
2121
$provider = new ArcGISOnline($this->getMockAdapter());
2222
$provider->geocode('loremipsum');
@@ -26,7 +26,7 @@ public function testGetGeocodedDataWithInvalidData()
2626
* @expectedException \Geocoder\Exception\NoResult
2727
* @expectedExceptionMessage Invalid address.
2828
*/
29-
public function testGetGeocodedDataWithNull()
29+
public function testGeocodeWithNull()
3030
{
3131
$provider = new ArcGISOnline($this->getMockAdapter($this->never()));
3232
$provider->geocode(null);
@@ -36,7 +36,7 @@ public function testGetGeocodedDataWithNull()
3636
* @expectedException \Geocoder\Exception\NoResult
3737
* @expectedExceptionMessage Invalid address.
3838
*/
39-
public function testGetGeocodedDataWithEmpty()
39+
public function testGeocodeWithEmpty()
4040
{
4141
$provider = new ArcGISOnline($this->getMockAdapter($this->never()));
4242
$provider->geocode('');
@@ -46,7 +46,7 @@ public function testGetGeocodedDataWithEmpty()
4646
* @expectedException \Geocoder\Exception\UnsupportedOperation
4747
* @expectedExceptionMessage The ArcGISOnline provider does not support IP addresses, only street addresses.
4848
*/
49-
public function testGetGeocodedDataWithLocalhostIPv4()
49+
public function testGeocodeWithLocalhostIPv4()
5050
{
5151
$provider = new ArcGISOnline($this->getMockAdapter($this->never()));
5252
$provider->geocode('127.0.0.1');
@@ -56,7 +56,7 @@ public function testGetGeocodedDataWithLocalhostIPv4()
5656
* @expectedException \Geocoder\Exception\UnsupportedOperation
5757
* @expectedExceptionMessage The ArcGISOnline provider does not support IP addresses, only street addresses.
5858
*/
59-
public function testGetGeocodedDataWithLocalhostIPv6()
59+
public function testGeocodeWithLocalhostIPv6()
6060
{
6161
$provider = new ArcGISOnline($this->getMockAdapter($this->never()));
6262
$provider->geocode('::1');
@@ -66,13 +66,13 @@ public function testGetGeocodedDataWithLocalhostIPv6()
6666
* @expectedException \Geocoder\Exception\NoResult
6767
* @expectedExceptionMessage Could not execute query "http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/find?text=10+avenue+Gambetta%2C+Paris%2C+France&maxLocations=5&f=json&outFields=*".
6868
*/
69-
public function testGetGeocodedDataWithAddressGetsNullContent()
69+
public function testGeocodeWithAddressGetsNullContent()
7070
{
7171
$provider = new ArcGISOnline($this->getMockAdapterReturns(null));
7272
$provider->geocode('10 avenue Gambetta, Paris, France');
7373
}
7474

75-
public function testGetGeocodedDataWithRealAddress()
75+
public function testGeocodeWithRealAddress()
7676
{
7777
$provider = new ArcGISOnline($this->getAdapter());
7878
$results = $provider->geocode('10 avenue Gambetta, Paris, France');
@@ -101,7 +101,7 @@ public function testGetGeocodedDataWithRealAddress()
101101
$this->assertNull($result->getTimezone());
102102
}
103103

104-
public function testGetGeocodedDataWithRealAddressAndHttps()
104+
public function testGeocodeWithRealAddressAndHttps()
105105
{
106106
$provider = new ArcGISOnline($this->getAdapter(), null, true);
107107
$results = $provider->geocode('10 avenue Gambetta, Paris, France');
@@ -135,7 +135,7 @@ public function testGetGeocodedDataWithRealAddressAndHttps()
135135
* @expectedException \Geocoder\Exception\NoResult
136136
* @expectedExceptionMessage No results found for query "http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/find?text=10+avenue+Gambetta%2C+Paris%2C+France".
137137
*/
138-
public function testGetGeocodedDataWithInvalidAddressForSourceCountry()
138+
public function testGeocodeWithInvalidAddressForSourceCountry()
139139
{
140140
$provider = new ArcGISOnline($this->getAdapter(), 'USA');
141141
$provider->geocode('10 avenue Gambetta, Paris, France');
@@ -145,7 +145,7 @@ public function testGetGeocodedDataWithInvalidAddressForSourceCountry()
145145
* @expectedException \Geocoder\Exception\NoResult
146146
* @expectedExceptionMessage No results found for query "https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/find?text=10+avenue+Gambetta%2C+Paris%2C+France".
147147
*/
148-
public function testGetGeocodedDataWithInvalidAddressWithHttpsForSourceCountry()
148+
public function testGeocodeWithInvalidAddressWithHttpsForSourceCountry()
149149
{
150150
$provider = new ArcGISOnline($this->getAdapter(), 'USA', true);
151151
$provider->geocode('10 avenue Gambetta, Paris, France');
@@ -155,7 +155,7 @@ public function testGetGeocodedDataWithInvalidAddressWithHttpsForSourceCountry()
155155
* @expectedException \Geocoder\Exception\NoResult
156156
* @expectedExceptionMessage Could not execute query "http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/reverseGeocode?location=2.000000,1.000000&maxLocations=5&f=json&outFields=*".
157157
*/
158-
public function testGetReversedDataWithInvalid()
158+
public function testReverseWithInvalid()
159159
{
160160
$provider = new ArcGISOnline($this->getMockAdapter());
161161
$provider->reverse(1, 2);
@@ -165,13 +165,13 @@ public function testGetReversedDataWithInvalid()
165165
* @expectedException \Geocoder\Exception\NoResult
166166
* @expectedExceptionMessage Could not execute query "http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/reverseGeocode?location=2.389020,48.863280&maxLocations=5&f=json&outFields=*".
167167
*/
168-
public function testGetReversedDataWithCoordinatesContentReturnNull()
168+
public function testReverseWithCoordinatesContentReturnNull()
169169
{
170170
$provider = new ArcGISOnline($this->getMockAdapterReturns(null));
171171
$provider->reverse(48.863279997000461, 2.3890199980004354);
172172
}
173173

174-
public function testGetReversedDataWithRealCoordinates()
174+
public function testReverseWithRealCoordinates()
175175
{
176176
$provider = new ArcGISOnline($this->getAdapter());
177177
$results = $provider->reverse(48.863279997000461, 2.3890199980004354);
@@ -200,7 +200,7 @@ public function testGetReversedDataWithRealCoordinates()
200200
$this->assertNull($result->getTimezone());
201201
}
202202

203-
public function testGetReversedDataWithRealCoordinatesWithHttps()
203+
public function testReverseWithRealCoordinatesWithHttps()
204204
{
205205
$provider = new ArcGISOnline($this->getAdapter(), null, true);
206206
$results = $provider->reverse(48.863279997000461, 2.3890199980004354);
@@ -229,7 +229,7 @@ public function testGetReversedDataWithRealCoordinatesWithHttps()
229229
$this->assertNull($result->getTimezone());
230230
}
231231

232-
public function testGetGeocodedDataWithCity()
232+
public function testGeocodeWithCity()
233233
{
234234
$provider = new ArcGISOnline($this->getAdapter());
235235
$results = $provider->geocode('Hannover');
@@ -302,7 +302,7 @@ public function testGetGeocodedDataWithCity()
302302
* @expectedException \Geocoder\Exception\UnsupportedOperation
303303
* @expectedExceptionMessage The ArcGISOnline provider does not support IP addresses, only street addresses.
304304
*/
305-
public function testGetGeocodedDataWithRealIPv4()
305+
public function testGeocodeWithRealIPv4()
306306
{
307307
$provider = new ArcGISOnline($this->getMockAdapter($this->never()));
308308
$provider->geocode('88.188.221.14');
@@ -312,7 +312,7 @@ public function testGetGeocodedDataWithRealIPv4()
312312
* @expectedException \Geocoder\Exception\UnsupportedOperation
313313
* @expectedExceptionMessage The ArcGISOnline provider does not support IP addresses, only street addresses.
314314
*/
315-
public function testGetGeocodedDataWithRealIPv6()
315+
public function testGeocodeWithRealIPv6()
316316
{
317317
$provider = new ArcGISOnline($this->getMockAdapter($this->never()));
318318
$provider->geocode('::ffff:88.188.221.14');

tests/Geocoder/Tests/Provider/GeoIP2Test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function testQueryingReverseLeadsToException()
4444
$this->provider->reverse(50, 9);
4545
}
4646

47-
public function testLocalhostDefaults()
47+
public function testGeocodeWithLocalhostIPv4()
4848
{
4949
$results = $this->provider->geocode('127.0.0.1');
5050

tests/Geocoder/Tests/Provider/GeoIPsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ public function testGeocodeWithRealIPv4NoResults()
367367
* @expectedException \Geocoder\Exception\UnsupportedOperation
368368
* @expectedExceptionMessage The GeoIPs provider is not able to do reverse geocoding.
369369
*/
370-
public function testGetReverseData()
370+
public function testReverse()
371371
{
372372
$provider = new GeoIPs($this->getMockAdapter($this->never()), 'api_key');
373373
$provider->reverse(1, 2);

tests/Geocoder/Tests/Provider/GeoPluginTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function testgetName()
1717
* @expectedException \Geocoder\Exception\UnsupportedOperation
1818
* @expectedExceptionMessage The GeoPlugin provider does not support street addresses, only IP addresses.
1919
*/
20-
public function testGetGeocodedDataWithNull()
20+
public function testGeocodeWithNull()
2121
{
2222
$provider = new GeoPlugin($this->getMockAdapter($this->never()));
2323
$provider->geocode(null);
@@ -27,7 +27,7 @@ public function testGetGeocodedDataWithNull()
2727
* @expectedException \Geocoder\Exception\UnsupportedOperation
2828
* @expectedExceptionMessage The GeoPlugin provider does not support street addresses, only IP addresses.
2929
*/
30-
public function testGetGeocodedDataWithEmpty()
30+
public function testGeocodeWithEmpty()
3131
{
3232
$provider = new GeoPlugin($this->getMockAdapter($this->never()));
3333
$provider->geocode('');
@@ -37,13 +37,13 @@ public function testGetGeocodedDataWithEmpty()
3737
* @expectedException \Geocoder\Exception\UnsupportedOperation
3838
* @expectedExceptionMessage The GeoPlugin provider does not support street addresses, only IP addresses.
3939
*/
40-
public function testGetGeocodedDataWithAddress()
40+
public function testGeocodeWithAddress()
4141
{
4242
$provider = new GeoPlugin($this->getMockAdapter($this->never()));
4343
$provider->geocode('10 avenue Gambetta, Paris, France');
4444
}
4545

46-
public function testGetGeocodedDataWithLocalhostIPv4()
46+
public function testGeocodeWithLocalhostIPv4()
4747
{
4848
$provider = new GeoPlugin($this->getMockAdapter($this->never()));
4949
$results = $provider->geocode('127.0.0.1');
@@ -58,7 +58,7 @@ public function testGetGeocodedDataWithLocalhostIPv4()
5858
$this->assertEquals('Localhost', $result->getCountry()->getName());
5959
}
6060

61-
public function testGetGeocodedDataWithLocalhostIPv6()
61+
public function testGeocodeWithLocalhostIPv6()
6262
{
6363
$provider = new GeoPlugin($this->getMockAdapter($this->never()));
6464
$results = $provider->geocode('::1');
@@ -77,7 +77,7 @@ public function testGetGeocodedDataWithLocalhostIPv6()
7777
* @expectedException \Geocoder\Exception\NoResult
7878
* @expectedExceptionMessage Could not execute query "http://www.geoplugin.net/json.gp?ip=74.200.247.59".
7979
*/
80-
public function testGetGeocodedDataWithRealIPv4GetsNullContent()
80+
public function testGeocodeWithRealIPv4GetsNullContent()
8181
{
8282
$provider = new GeoPlugin($this->getMockAdapterReturns(null));
8383
$provider->geocode('74.200.247.59');
@@ -87,13 +87,13 @@ public function testGetGeocodedDataWithRealIPv4GetsNullContent()
8787
* @expectedException \Geocoder\Exception\NoResult
8888
* @expectedExceptionMessage Could not execute query "http://www.geoplugin.net/json.gp?ip=74.200.247.59".
8989
*/
90-
public function testGetGeocodedDataWithRealIPv4GetsEmptyContent()
90+
public function testGeocodeWithRealIPv4GetsEmptyContent()
9191
{
9292
$provider = new GeoPlugin($this->getMockAdapterReturns(''));
9393
$provider->geocode('74.200.247.59');
9494
}
9595

96-
public function testGetGeocodedDataWithRealIPv4()
96+
public function testGeocodeWithRealIPv4()
9797
{
9898
$provider = new GeoPlugin($this->getAdapter());
9999
$results = $provider->geocode('66.147.244.214');
@@ -115,7 +115,7 @@ public function testGetGeocodedDataWithRealIPv4()
115115
* @expectedException \Geocoder\Exception\UnsupportedOperation
116116
* @expectedExceptionMessage The GeoPlugin provider is not able to do reverse geocoding.
117117
*/
118-
public function testGetReverseData()
118+
public function testReverse()
119119
{
120120
$provider = new GeoPlugin($this->getMockAdapter($this->never()));
121121
$provider->reverse(1, 2);

tests/Geocoder/Tests/Provider/GeoipTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function testGetName()
2626
* @expectedException \Geocoder\Exception\UnsupportedOperation
2727
* @expectedExceptionMessage The Geoip does not support Street addresses.
2828
*/
29-
public function testGetGeocodedDataWithNull()
29+
public function testGeocodeWithNull()
3030
{
3131
$provider = new Geoip();
3232
$provider->geocode(null);
@@ -36,7 +36,7 @@ public function testGetGeocodedDataWithNull()
3636
* @expectedException \Geocoder\Exception\UnsupportedOperation
3737
* @expectedExceptionMessage The Geoip does not support Street addresses.
3838
*/
39-
public function testGetGeocodedDataWithEmpty()
39+
public function testGeocodeWithEmpty()
4040
{
4141
$provider = new Geoip();
4242
$provider->geocode('');
@@ -46,13 +46,13 @@ public function testGetGeocodedDataWithEmpty()
4646
* @expectedException \Geocoder\Exception\UnsupportedOperation
4747
* @expectedExceptionMessage The Geoip does not support Street addresses.
4848
*/
49-
public function testGetGeocodedDataWithAddress()
49+
public function testGeocodeWithAddress()
5050
{
5151
$provider = new Geoip();
5252
$provider->geocode('10 avenue Gambetta, Paris, France');
5353
}
5454

55-
public function testGetGeocodedDataWithLocalhostIPv4()
55+
public function testGeocodeWithLocalhostIPv4()
5656
{
5757
$provider = new Geoip();
5858
$results = $provider->geocode('127.0.0.1');
@@ -77,13 +77,13 @@ public function testGetGeocodedDataWithLocalhostIPv4()
7777
* @expectedException \Geocoder\Exception\UnsupportedOperation
7878
* @expectedExceptionMessage The Geoip does not support IPv6 addresses.
7979
*/
80-
public function testGetGeocodedDataWithLocalhostIPv6()
80+
public function testGeocodeWithLocalhostIPv6()
8181
{
8282
$provider = new Geoip();
8383
$provider->geocode('::1');
8484
}
8585

86-
public function testGetGeocodedDataWithRealIPv4()
86+
public function testGeocodeWithRealIPv4()
8787
{
8888
$provider = new Geoip();
8989
$results = $provider->geocode('74.200.247.59');
@@ -109,7 +109,7 @@ public function testGetGeocodedDataWithRealIPv4()
109109
* @expectedException \Geocoder\Exception\UnsupportedOperation
110110
* @expectedExceptionMessage The Geoip does not support IPv6 addresses.
111111
*/
112-
public function testGetGeocodedDataWithRealIPv6()
112+
public function testGeocodeWithRealIPv6()
113113
{
114114
$provider = new Geoip();
115115
$provider->geocode('::ffff:74.200.247.59');
@@ -119,7 +119,7 @@ public function testGetGeocodedDataWithRealIPv6()
119119
* @expectedException \Geocoder\Exception\UnsupportedOperation
120120
* @expectedExceptionMessage The Geoip is not able to do reverse geocoding.
121121
*/
122-
public function testGetReverseData()
122+
public function testReverse()
123123
{
124124
$provider = new Geoip();
125125
$provider->reverse(1, 2);

0 commit comments

Comments
 (0)