3
3
namespace Geocoder \Tests \Provider ;
4
4
5
5
use Geocoder \Tests \TestCase ;
6
- use Geocoder \Provider \ArcGISOnlineProvider ;
6
+ use Geocoder \Provider \ArcGISOnline ;
7
7
8
- class ArcGISOnlineProviderTest extends TestCase
8
+ class ArcGISOnlineTest extends TestCase
9
9
{
10
10
public function testGetName ()
11
11
{
12
- $ provider = new ArcGISOnlineProvider ($ this ->getMockAdapter ($ this ->never ()));
12
+ $ provider = new ArcGISOnline ($ this ->getMockAdapter ($ this ->never ()));
13
13
$ this ->assertEquals ('arcgis_online ' , $ provider ->getName ());
14
14
}
15
15
@@ -18,7 +18,7 @@ public function testGetName()
18
18
*/
19
19
public function testGetGeocodedDataWithInvalidData ()
20
20
{
21
- $ provider = new ArcGISOnlineProvider ($ this ->getMockAdapter ());
21
+ $ provider = new ArcGISOnline ($ this ->getMockAdapter ());
22
22
$ provider ->getGeocodedData ('loremipsum ' );
23
23
}
24
24
@@ -28,7 +28,7 @@ public function testGetGeocodedDataWithInvalidData()
28
28
*/
29
29
public function testGetGeocodedDataWithNull ()
30
30
{
31
- $ provider = new ArcGISOnlineProvider ($ this ->getMockAdapter ($ this ->never ()));
31
+ $ provider = new ArcGISOnline ($ this ->getMockAdapter ($ this ->never ()));
32
32
$ provider ->getGeocodedData (null );
33
33
}
34
34
@@ -38,27 +38,27 @@ public function testGetGeocodedDataWithNull()
38
38
*/
39
39
public function testGetGeocodedDataWithEmpty ()
40
40
{
41
- $ provider = new ArcGISOnlineProvider ($ this ->getMockAdapter ($ this ->never ()));
41
+ $ provider = new ArcGISOnline ($ this ->getMockAdapter ($ this ->never ()));
42
42
$ provider ->getGeocodedData ('' );
43
43
}
44
44
45
45
/**
46
46
* @expectedException \Geocoder\Exception\UnsupportedOperation
47
- * @expectedExceptionMessage The ArcGISOnlineProvider does not support IP addresses.
47
+ * @expectedExceptionMessage The ArcGISOnline does not support IP addresses.
48
48
*/
49
49
public function testGetGeocodedDataWithLocalhostIPv4 ()
50
50
{
51
- $ provider = new ArcGISOnlineProvider ($ this ->getMockAdapter ($ this ->never ()));
51
+ $ provider = new ArcGISOnline ($ this ->getMockAdapter ($ this ->never ()));
52
52
$ provider ->getGeocodedData ('127.0.0.1 ' );
53
53
}
54
54
55
55
/**
56
56
* @expectedException \Geocoder\Exception\UnsupportedOperation
57
- * @expectedExceptionMessage The ArcGISOnlineProvider does not support IP addresses.
57
+ * @expectedExceptionMessage The ArcGISOnline does not support IP addresses.
58
58
*/
59
59
public function testGetGeocodedDataWithLocalhostIPv6 ()
60
60
{
61
- $ provider = new ArcGISOnlineProvider ($ this ->getMockAdapter ($ this ->never ()));
61
+ $ provider = new ArcGISOnline ($ this ->getMockAdapter ($ this ->never ()));
62
62
$ provider ->getGeocodedData ('::1 ' );
63
63
}
64
64
@@ -68,13 +68,13 @@ public function testGetGeocodedDataWithLocalhostIPv6()
68
68
*/
69
69
public function testGetGeocodedDataWithAddressGetsNullContent ()
70
70
{
71
- $ provider = new ArcGISOnlineProvider ($ this ->getMockAdapterReturns (null ));
71
+ $ provider = new ArcGISOnline ($ this ->getMockAdapterReturns (null ));
72
72
$ provider ->getGeocodedData ('10 avenue Gambetta, Paris, France ' );
73
73
}
74
74
75
75
public function testGetGeocodedDataWithRealAddress ()
76
76
{
77
- $ provider = new ArcGISOnlineProvider ($ this ->getAdapter ());
77
+ $ provider = new ArcGISOnline ($ this ->getAdapter ());
78
78
$ results = $ provider ->getGeocodedData ('10 avenue Gambetta, Paris, France ' );
79
79
80
80
$ this ->assertInternalType ('array ' , $ results );
@@ -102,7 +102,7 @@ public function testGetGeocodedDataWithRealAddress()
102
102
103
103
public function testGetGeocodedDataWithRealAddressAndHttps ()
104
104
{
105
- $ provider = new ArcGISOnlineProvider ($ this ->getAdapter (), null , true );
105
+ $ provider = new ArcGISOnline ($ this ->getAdapter (), null , true );
106
106
$ results = $ provider ->getGeocodedData ('10 avenue Gambetta, Paris, France ' );
107
107
108
108
$ this ->assertInternalType ('array ' , $ results );
@@ -134,7 +134,7 @@ public function testGetGeocodedDataWithRealAddressAndHttps()
134
134
*/
135
135
public function testGetGeocodedDataWithInvalidAddressForSourceCountry ()
136
136
{
137
- $ provider = new ArcGISOnlineProvider ($ this ->getAdapter (), 'USA ' );
137
+ $ provider = new ArcGISOnline ($ this ->getAdapter (), 'USA ' );
138
138
$ result = $ provider ->getGeocodedData ('10 avenue Gambetta, Paris, France ' );
139
139
}
140
140
@@ -144,7 +144,7 @@ public function testGetGeocodedDataWithInvalidAddressForSourceCountry()
144
144
*/
145
145
public function testGetGeocodedDataWithInvalidAddressWithHttpsForSourceCountry ()
146
146
{
147
- $ provider = new ArcGISOnlineProvider ($ this ->getAdapter (), 'USA ' , true );
147
+ $ provider = new ArcGISOnline ($ this ->getAdapter (), 'USA ' , true );
148
148
$ result = $ provider ->getGeocodedData ('10 avenue Gambetta, Paris, France ' );
149
149
}
150
150
@@ -154,7 +154,7 @@ public function testGetGeocodedDataWithInvalidAddressWithHttpsForSourceCountry()
154
154
*/
155
155
public function testGetReversedDataWithInvalid ()
156
156
{
157
- $ provider = new ArcGISOnlineProvider ($ this ->getMockAdapter ());
157
+ $ provider = new ArcGISOnline ($ this ->getMockAdapter ());
158
158
$ provider ->getReversedData (array (1 , 2 ));
159
159
}
160
160
@@ -164,13 +164,13 @@ public function testGetReversedDataWithInvalid()
164
164
*/
165
165
public function testGetReversedDataWithCoordinatesContentReturnNull ()
166
166
{
167
- $ provider = new ArcGISOnlineProvider ($ this ->getMockAdapterReturns (null ));
167
+ $ provider = new ArcGISOnline ($ this ->getMockAdapterReturns (null ));
168
168
$ provider ->getReversedData (array (48.863279997000461 , 2.3890199980004354 ));
169
169
}
170
170
171
171
public function testGetReversedDataWithRealCoordinates ()
172
172
{
173
- $ provider = new ArcGISOnlineProvider ($ this ->getAdapter ());
173
+ $ provider = new ArcGISOnline ($ this ->getAdapter ());
174
174
$ result = $ provider ->getReversedData (array (48.863279997000461 , 2.3890199980004354 ));
175
175
176
176
$ this ->assertInternalType ('array ' , $ result );
@@ -197,7 +197,7 @@ public function testGetReversedDataWithRealCoordinates()
197
197
198
198
public function testGetReversedDataWithRealCoordinatesWithHttps ()
199
199
{
200
- $ provider = new ArcGISOnlineProvider ($ this ->getAdapter (), null , true );
200
+ $ provider = new ArcGISOnline ($ this ->getAdapter (), null , true );
201
201
$ result = $ provider ->getReversedData (array (48.863279997000461 , 2.3890199980004354 ));
202
202
203
203
$ this ->assertInternalType ('array ' , $ result );
@@ -224,7 +224,7 @@ public function testGetReversedDataWithRealCoordinatesWithHttps()
224
224
225
225
public function testGetGeocodedDataWithCity ()
226
226
{
227
- $ provider = new ArcGISOnlineProvider ($ this ->getAdapter ());
227
+ $ provider = new ArcGISOnline ($ this ->getAdapter ());
228
228
$ results = $ provider ->getGeocodedData ('Hannover ' );
229
229
230
230
$ this ->assertInternalType ('array ' , $ results );
@@ -283,21 +283,21 @@ public function testGetGeocodedDataWithCity()
283
283
284
284
/**
285
285
* @expectedException \Geocoder\Exception\UnsupportedOperation
286
- * @expectedExceptionMessage The ArcGISOnlineProvider does not support IP addresses.
286
+ * @expectedExceptionMessage The ArcGISOnline does not support IP addresses.
287
287
*/
288
288
public function testGetGeocodedDataWithRealIPv4 ()
289
289
{
290
- $ provider = new ArcGISOnlineProvider ($ this ->getMockAdapter ($ this ->never ()));
290
+ $ provider = new ArcGISOnline ($ this ->getMockAdapter ($ this ->never ()));
291
291
$ provider ->getGeocodedData ('88.188.221.14 ' );
292
292
}
293
293
294
294
/**
295
295
* @expectedException \Geocoder\Exception\UnsupportedOperation
296
- * @expectedExceptionMessage The ArcGISOnlineProvider does not support IP addresses.
296
+ * @expectedExceptionMessage The ArcGISOnline does not support IP addresses.
297
297
*/
298
298
public function testGetGeocodedDataWithRealIPv6 ()
299
299
{
300
- $ provider = new ArcGISOnlineProvider ($ this ->getMockAdapter ($ this ->never ()));
300
+ $ provider = new ArcGISOnline ($ this ->getMockAdapter ($ this ->never ()));
301
301
$ provider ->getGeocodedData ('::ffff:88.188.221.14 ' );
302
302
}
303
303
}
0 commit comments