File tree Expand file tree Collapse file tree 3 files changed +10
-11
lines changed Expand file tree Collapse file tree 3 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -47,9 +47,9 @@ Next add the following to the `aliases` array in your `config/app.php`
4747
4848Next run ` php artisan vendor:publish --provider="PulkitJalan\GeoIP\GeoIPServiceProvider" --tag="config" ` to publish the config file.
4949
50- #### Looking for a Laravel 4 compatible version ?
50+ #### Using an older version of PHP / Laravel ?
5151
52- Checkout the [ 1.0 branch ] ( https://github.com/pulkitjalan/geoip/tree/1.0 )
52+ If you are on a PHP version below 7.2 or a Laravel version below 5.8 just use an older version of this package.
5353
5454## Usage
5555
Original file line number Diff line number Diff line change 1010 }
1111 ],
1212 "require" : {
13- "php" : " >=7.0 " ,
14- "illuminate/support" : " ~5|~6 " ,
15- "illuminate/console" : " ~5|~6 " ,
16- "guzzlehttp/guzzle" : " ~6 " ,
17- "geoip2/geoip2" : " ^2.0 "
13+ "php" : " ^7.2 " ,
14+ "illuminate/support" : " ~5.8.0|^6.0 " ,
15+ "illuminate/console" : " ~5.8.0|^6.0 " ,
16+ "guzzlehttp/guzzle" : " ^6.3 " ,
17+ "geoip2/geoip2" : " ^2.9 "
1818 },
1919 "require-dev" : {
2020 "phpunit/phpunit" : " ^8.3" ,
Original file line number Diff line number Diff line change 44
55use Mockery ;
66use BadMethodCallException ;
7+ use Illuminate \Support \Arr ;
78use PulkitJalan \GeoIP \GeoIP ;
89use PHPUnit \Framework \TestCase ;
910use PulkitJalan \GeoIP \Exceptions \GeoIPException ;
@@ -255,13 +256,11 @@ public function test_ip_api()
255256 $ geoip = new GeoIP ($ config );
256257 $ geoip = $ geoip ->setIp ($ this ->validIp );
257258
258- $ this ->assertEquals ($ geoip ->getCountry (), 'United States ' );
259+ $ this ->assertEquals ($ geoip ->getCountry (), 'United Kingdom ' );
259260
260261 $ geoip = $ geoip ->setIp ($ this ->invalidIp );
261262
262- $ this ->assertArraySubset ([
263- 'status ' => 'fail ' ,
264- ], $ geoip ->getRaw ());
263+ $ this ->assertEquals ('fail ' , Arr::get ($ geoip ->getRaw (), 'status ' ));
265264
266265 $ this ->assertEquals ([
267266 'city ' => null ,
You can’t perform that action at this time.
0 commit comments