@@ -118,7 +118,8 @@ public function testGeocodeWithRealIPv4GetsFakeContentFormattedEmpty()
118
118
public function testGeocodeWithRealIPv4GetsFakeContent ()
119
119
{
120
120
$ provider = new MaxMind ($ this ->getMockedHttpClient (
121
- 'US,TX,Plano,75093,33.034698486328,-96.813400268555,,,, ' ), 'api_key ' );
121
+ 'US,TX,Plano,75093,33.034698486328,-96.813400268555,,,, '
122
+ ), 'api_key ' );
122
123
$ results = $ provider ->geocodeQuery (GeocodeQuery::create ('74.200.247.59 ' ));
123
124
124
125
$ this ->assertInstanceOf ('Geocoder\Model\AddressCollection ' , $ results );
@@ -149,7 +150,8 @@ public function testGeocodeWithRealIPv4GetsFakeContent()
149
150
$ this ->assertEquals ('United Kingdom ' , $ result3 ->first ()->getCountry ()->getName ());
150
151
151
152
$ provider4 = new MaxMind ($ this ->getMockedHttpClient (
152
- 'US,CA,San Francisco,94110,37.748402,-122.415604,807,415,"Layered Technologies","Automattic" ' ), 'api_key ' );
153
+ 'US,CA,San Francisco,94110,37.748402,-122.415604,807,415,"Layered Technologies","Automattic" '
154
+ ), 'api_key ' );
153
155
$ results = $ provider4 ->geocodeQuery (GeocodeQuery::create ('74.200.247.59 ' ));
154
156
155
157
$ this ->assertInstanceOf ('Geocoder\Model\AddressCollection ' , $ results );
@@ -188,8 +190,11 @@ public function testGeocodeWithRealIPv4AndInvalidApiKeyGetsFakeContent()
188
190
*/
189
191
public function testGeocodeOmniServiceWithRealIPv6AndInvalidApiKeyGetsFakeContent ()
190
192
{
191
- $ provider = new MaxMind ($ this ->getMockedHttpClient (',,,,,,,,,,,,,,,,,,,,,,,,INVALID_LICENSE_KEY ' ),
192
- 'api_key ' , MaxMind::OMNI_SERVICE );
193
+ $ provider = new MaxMind (
194
+ $ this ->getMockedHttpClient (',,,,,,,,,,,,,,,,,,,,,,,,INVALID_LICENSE_KEY ' ),
195
+ 'api_key ' ,
196
+ MaxMind::OMNI_SERVICE
197
+ );
193
198
$ provider ->geocodeQuery (GeocodeQuery::create ('::ffff:74.200.247.59 ' ));
194
199
}
195
200
@@ -219,8 +224,11 @@ public function testGeocodeWithRealIPv4AndInvalidApiKeyGetsFakeContent2()
219
224
*/
220
225
public function testGeocodeOmniServiceWithRealIPv6AndInvalidApiKeyGetsFakeContent2 ()
221
226
{
222
- $ provider = new MaxMind ($ this ->getMockedHttpClient (',,,,,,,,,,,,,,,,,,,,,,,INVALID_LICENSE_KEY ' ),
223
- 'api_key ' , MaxMind::OMNI_SERVICE );
227
+ $ provider = new MaxMind (
228
+ $ this ->getMockedHttpClient (',,,,,,,,,,,,,,,,,,,,,,,INVALID_LICENSE_KEY ' ),
229
+ 'api_key ' ,
230
+ MaxMind::OMNI_SERVICE
231
+ );
224
232
$ provider ->geocodeQuery (GeocodeQuery::create ('::ffff:74.200.247.59 ' ));
225
233
}
226
234
@@ -235,8 +243,11 @@ public function testGeocodeWithRealIPv4GetsFakeContentWithIpNotFound()
235
243
236
244
public function testGeocodeOmniServiceWithRealIPv6GetsFakeContentWithIpNotFound ()
237
245
{
238
- $ provider = new MaxMind ($ this ->getMockedHttpClient (',,,,,,,,,,,,,,,,,,,,,,,IP_NOT_FOUND ' ),
239
- 'api_key ' , MaxMind::OMNI_SERVICE );
246
+ $ provider = new MaxMind (
247
+ $ this ->getMockedHttpClient (',,,,,,,,,,,,,,,,,,,,,,,IP_NOT_FOUND ' ),
248
+ 'api_key ' ,
249
+ MaxMind::OMNI_SERVICE
250
+ );
240
251
$ result = $ provider ->geocodeQuery (GeocodeQuery::create ('::fff:74.200.247.59 ' ));
241
252
242
253
$ this ->assertInstanceOf (Collection::class, $ result );
@@ -289,8 +300,11 @@ public function testGeocodeOmniServiceWithRealIPv4()
289
300
$ this ->markTestSkipped ('You need to configure the MAXMIND_API_KEY value in phpunit.xml ' );
290
301
}
291
302
292
- $ provider = new MaxMind ($ this ->getHttpClient ($ _SERVER ['MAXMIND_API_KEY ' ]), $ _SERVER ['MAXMIND_API_KEY ' ],
293
- MaxMind::OMNI_SERVICE );
303
+ $ provider = new MaxMind (
304
+ $ this ->getHttpClient ($ _SERVER ['MAXMIND_API_KEY ' ]),
305
+ $ _SERVER ['MAXMIND_API_KEY ' ],
306
+ MaxMind::OMNI_SERVICE
307
+ );
294
308
$ results = $ provider ->geocodeQuery (GeocodeQuery::create ('74.200.247.159 ' ));
295
309
296
310
$ this ->assertInstanceOf ('Geocoder\Model\AddressCollection ' , $ results );
@@ -321,8 +335,11 @@ public function testGeocodeOmniServiceWithRealIPv4WithSslAndEncoding()
321
335
$ this ->markTestSkipped ('You need to configure the MAXMIND_API_KEY value in phpunit.xml ' );
322
336
}
323
337
324
- $ provider = new MaxMind ($ this ->getHttpClient ($ _SERVER ['MAXMIND_API_KEY ' ]), $ _SERVER ['MAXMIND_API_KEY ' ],
325
- MaxMind::OMNI_SERVICE );
338
+ $ provider = new MaxMind (
339
+ $ this ->getHttpClient ($ _SERVER ['MAXMIND_API_KEY ' ]),
340
+ $ _SERVER ['MAXMIND_API_KEY ' ],
341
+ MaxMind::OMNI_SERVICE
342
+ );
326
343
$ results = $ provider ->geocodeQuery (GeocodeQuery::create ('189.26.128.80 ' ));
327
344
328
345
$ this ->assertInstanceOf ('Geocoder\Model\AddressCollection ' , $ results );
@@ -353,8 +370,11 @@ public function testGeocodeOmniServiceWithRealIPv6WithSsl()
353
370
$ this ->markTestSkipped ('You need to configure the MAXMIND_API_KEY value in phpunit.xml ' );
354
371
}
355
372
356
- $ provider = new MaxMind ($ this ->getHttpClient ($ _SERVER ['MAXMIND_API_KEY ' ]), $ _SERVER ['MAXMIND_API_KEY ' ],
357
- MaxMind::OMNI_SERVICE );
373
+ $ provider = new MaxMind (
374
+ $ this ->getHttpClient ($ _SERVER ['MAXMIND_API_KEY ' ]),
375
+ $ _SERVER ['MAXMIND_API_KEY ' ],
376
+ MaxMind::OMNI_SERVICE
377
+ );
358
378
$ results = $ provider ->geocodeQuery (GeocodeQuery::create ('2002:4293:f4d6:0:0:0:0:0 ' ));
359
379
360
380
$ this ->assertInstanceOf ('Geocoder\Model\AddressCollection ' , $ results );
0 commit comments