Skip to content

Commit f04c095

Browse files
committed
Rename ArcGISOnline provider class
1 parent 4c551bd commit f04c095

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

src/Geocoder/Provider/ArcGISOnlineProvider.php renamed to src/Geocoder/Provider/ArcGISOnline.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
/**
1818
* @author ALKOUM Dorian <[email protected]>
1919
*/
20-
class ArcGISOnlineProvider extends AbstractProvider implements Provider
20+
class ArcGISOnline extends AbstractProvider implements Provider
2121
{
2222
/**
2323
* @var string
@@ -58,7 +58,7 @@ public function __construct(HttpAdapterInterface $adapter, $sourceCountry = null
5858
public function getGeocodedData($address)
5959
{
6060
if (filter_var($address, FILTER_VALIDATE_IP)) {
61-
throw new UnsupportedOperation('The ArcGISOnlineProvider does not support IP addresses.');
61+
throw new UnsupportedOperation('The ArcGISOnline does not support IP addresses.');
6262
}
6363

6464
// Save a request if no valid address entered

tests/Geocoder/Tests/Provider/ArcGISOnlineProviderTest.php renamed to tests/Geocoder/Tests/Provider/ArcGISOnlineTest.php

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
namespace Geocoder\Tests\Provider;
44

55
use Geocoder\Tests\TestCase;
6-
use Geocoder\Provider\ArcGISOnlineProvider;
6+
use Geocoder\Provider\ArcGISOnline;
77

8-
class ArcGISOnlineProviderTest extends TestCase
8+
class ArcGISOnlineTest extends TestCase
99
{
1010
public function testGetName()
1111
{
12-
$provider = new ArcGISOnlineProvider($this->getMockAdapter($this->never()));
12+
$provider = new ArcGISOnline($this->getMockAdapter($this->never()));
1313
$this->assertEquals('arcgis_online', $provider->getName());
1414
}
1515

@@ -18,7 +18,7 @@ public function testGetName()
1818
*/
1919
public function testGetGeocodedDataWithInvalidData()
2020
{
21-
$provider = new ArcGISOnlineProvider($this->getMockAdapter());
21+
$provider = new ArcGISOnline($this->getMockAdapter());
2222
$provider->getGeocodedData('loremipsum');
2323
}
2424

@@ -28,7 +28,7 @@ public function testGetGeocodedDataWithInvalidData()
2828
*/
2929
public function testGetGeocodedDataWithNull()
3030
{
31-
$provider = new ArcGISOnlineProvider($this->getMockAdapter($this->never()));
31+
$provider = new ArcGISOnline($this->getMockAdapter($this->never()));
3232
$provider->getGeocodedData(null);
3333
}
3434

@@ -38,27 +38,27 @@ public function testGetGeocodedDataWithNull()
3838
*/
3939
public function testGetGeocodedDataWithEmpty()
4040
{
41-
$provider = new ArcGISOnlineProvider($this->getMockAdapter($this->never()));
41+
$provider = new ArcGISOnline($this->getMockAdapter($this->never()));
4242
$provider->getGeocodedData('');
4343
}
4444

4545
/**
4646
* @expectedException \Geocoder\Exception\UnsupportedOperation
47-
* @expectedExceptionMessage The ArcGISOnlineProvider does not support IP addresses.
47+
* @expectedExceptionMessage The ArcGISOnline does not support IP addresses.
4848
*/
4949
public function testGetGeocodedDataWithLocalhostIPv4()
5050
{
51-
$provider = new ArcGISOnlineProvider($this->getMockAdapter($this->never()));
51+
$provider = new ArcGISOnline($this->getMockAdapter($this->never()));
5252
$provider->getGeocodedData('127.0.0.1');
5353
}
5454

5555
/**
5656
* @expectedException \Geocoder\Exception\UnsupportedOperation
57-
* @expectedExceptionMessage The ArcGISOnlineProvider does not support IP addresses.
57+
* @expectedExceptionMessage The ArcGISOnline does not support IP addresses.
5858
*/
5959
public function testGetGeocodedDataWithLocalhostIPv6()
6060
{
61-
$provider = new ArcGISOnlineProvider($this->getMockAdapter($this->never()));
61+
$provider = new ArcGISOnline($this->getMockAdapter($this->never()));
6262
$provider->getGeocodedData('::1');
6363
}
6464

@@ -68,13 +68,13 @@ public function testGetGeocodedDataWithLocalhostIPv6()
6868
*/
6969
public function testGetGeocodedDataWithAddressGetsNullContent()
7070
{
71-
$provider = new ArcGISOnlineProvider($this->getMockAdapterReturns(null));
71+
$provider = new ArcGISOnline($this->getMockAdapterReturns(null));
7272
$provider->getGeocodedData('10 avenue Gambetta, Paris, France');
7373
}
7474

7575
public function testGetGeocodedDataWithRealAddress()
7676
{
77-
$provider = new ArcGISOnlineProvider($this->getAdapter());
77+
$provider = new ArcGISOnline($this->getAdapter());
7878
$results = $provider->getGeocodedData('10 avenue Gambetta, Paris, France');
7979

8080
$this->assertInternalType('array', $results);
@@ -102,7 +102,7 @@ public function testGetGeocodedDataWithRealAddress()
102102

103103
public function testGetGeocodedDataWithRealAddressAndHttps()
104104
{
105-
$provider = new ArcGISOnlineProvider($this->getAdapter(), null, true);
105+
$provider = new ArcGISOnline($this->getAdapter(), null, true);
106106
$results = $provider->getGeocodedData('10 avenue Gambetta, Paris, France');
107107

108108
$this->assertInternalType('array', $results);
@@ -134,7 +134,7 @@ public function testGetGeocodedDataWithRealAddressAndHttps()
134134
*/
135135
public function testGetGeocodedDataWithInvalidAddressForSourceCountry()
136136
{
137-
$provider = new ArcGISOnlineProvider($this->getAdapter(), 'USA');
137+
$provider = new ArcGISOnline($this->getAdapter(), 'USA');
138138
$result = $provider->getGeocodedData('10 avenue Gambetta, Paris, France');
139139
}
140140

@@ -144,7 +144,7 @@ public function testGetGeocodedDataWithInvalidAddressForSourceCountry()
144144
*/
145145
public function testGetGeocodedDataWithInvalidAddressWithHttpsForSourceCountry()
146146
{
147-
$provider = new ArcGISOnlineProvider($this->getAdapter(), 'USA', true);
147+
$provider = new ArcGISOnline($this->getAdapter(), 'USA', true);
148148
$result = $provider->getGeocodedData('10 avenue Gambetta, Paris, France');
149149
}
150150

@@ -154,7 +154,7 @@ public function testGetGeocodedDataWithInvalidAddressWithHttpsForSourceCountry()
154154
*/
155155
public function testGetReversedDataWithInvalid()
156156
{
157-
$provider = new ArcGISOnlineProvider($this->getMockAdapter());
157+
$provider = new ArcGISOnline($this->getMockAdapter());
158158
$provider->getReversedData(array(1, 2));
159159
}
160160

@@ -164,13 +164,13 @@ public function testGetReversedDataWithInvalid()
164164
*/
165165
public function testGetReversedDataWithCoordinatesContentReturnNull()
166166
{
167-
$provider = new ArcGISOnlineProvider($this->getMockAdapterReturns(null));
167+
$provider = new ArcGISOnline($this->getMockAdapterReturns(null));
168168
$provider->getReversedData(array(48.863279997000461, 2.3890199980004354));
169169
}
170170

171171
public function testGetReversedDataWithRealCoordinates()
172172
{
173-
$provider = new ArcGISOnlineProvider($this->getAdapter());
173+
$provider = new ArcGISOnline($this->getAdapter());
174174
$result = $provider->getReversedData(array(48.863279997000461, 2.3890199980004354));
175175

176176
$this->assertInternalType('array', $result);
@@ -197,7 +197,7 @@ public function testGetReversedDataWithRealCoordinates()
197197

198198
public function testGetReversedDataWithRealCoordinatesWithHttps()
199199
{
200-
$provider = new ArcGISOnlineProvider($this->getAdapter(), null, true);
200+
$provider = new ArcGISOnline($this->getAdapter(), null, true);
201201
$result = $provider->getReversedData(array(48.863279997000461, 2.3890199980004354));
202202

203203
$this->assertInternalType('array', $result);
@@ -224,7 +224,7 @@ public function testGetReversedDataWithRealCoordinatesWithHttps()
224224

225225
public function testGetGeocodedDataWithCity()
226226
{
227-
$provider = new ArcGISOnlineProvider($this->getAdapter());
227+
$provider = new ArcGISOnline($this->getAdapter());
228228
$results = $provider->getGeocodedData('Hannover');
229229

230230
$this->assertInternalType('array', $results);
@@ -283,21 +283,21 @@ public function testGetGeocodedDataWithCity()
283283

284284
/**
285285
* @expectedException \Geocoder\Exception\UnsupportedOperation
286-
* @expectedExceptionMessage The ArcGISOnlineProvider does not support IP addresses.
286+
* @expectedExceptionMessage The ArcGISOnline does not support IP addresses.
287287
*/
288288
public function testGetGeocodedDataWithRealIPv4()
289289
{
290-
$provider = new ArcGISOnlineProvider($this->getMockAdapter($this->never()));
290+
$provider = new ArcGISOnline($this->getMockAdapter($this->never()));
291291
$provider->getGeocodedData('88.188.221.14');
292292
}
293293

294294
/**
295295
* @expectedException \Geocoder\Exception\UnsupportedOperation
296-
* @expectedExceptionMessage The ArcGISOnlineProvider does not support IP addresses.
296+
* @expectedExceptionMessage The ArcGISOnline does not support IP addresses.
297297
*/
298298
public function testGetGeocodedDataWithRealIPv6()
299299
{
300-
$provider = new ArcGISOnlineProvider($this->getMockAdapter($this->never()));
300+
$provider = new ArcGISOnline($this->getMockAdapter($this->never()));
301301
$provider->getGeocodedData('::ffff:88.188.221.14');
302302
}
303303
}

0 commit comments

Comments
 (0)