diff --git a/.github/workflows/phpunit.yaml b/.github/workflows/phpunit.yaml index a550a29..364fbed 100644 --- a/.github/workflows/phpunit.yaml +++ b/.github/workflows/phpunit.yaml @@ -1,7 +1,12 @@ name: Unit Tests on: + push: + branches: + - master pull_request: + branches: + - master permissions: contents: read diff --git a/tests/IPinfoTest.php b/tests/IPinfoTest.php index 5d870ec..75d0c6f 100644 --- a/tests/IPinfoTest.php +++ b/tests/IPinfoTest.php @@ -98,9 +98,9 @@ public function testLookup() $this->assertEquals($res->country_currency['symbol'], '$'); $this->assertEquals($res->continent['code'], 'NA'); $this->assertEquals($res->continent['name'], 'North America'); - $this->assertEquals($res->loc, '37.4056,-122.0775'); - $this->assertEquals($res->latitude, '37.4056'); - $this->assertEquals($res->longitude, '-122.0775'); + $this->assertEquals($res->loc, '38.0088,-122.1175'); + $this->assertEquals($res->latitude, '38.0088'); + $this->assertEquals($res->longitude, '-122.1175'); $this->assertEquals($res->postal, '94043'); $this->assertEquals($res->timezone, 'America/Los_Angeles'); if ($res->asn !== null) { @@ -205,12 +205,12 @@ public function testGetBatchDetails() $this->assertEquals($res['8.8.8.8/hostname'], 'dns.google'); $ipV4 = $res['4.4.4.4']; $this->assertEquals($ipV4['ip'], '4.4.4.4'); - $this->assertEquals($ipV4['city'], 'Dhaka'); - $this->assertEquals($ipV4['region'], 'Dhaka Division'); - $this->assertEquals($ipV4['country'], 'BD'); - $this->assertEquals($ipV4['loc'], '23.7104,90.4074'); - $this->assertEquals($ipV4['postal'], '1000'); - $this->assertEquals($ipV4['timezone'], 'Asia/Dhaka'); + $this->assertEquals($ipV4['city'], 'Paris'); + $this->assertEquals($ipV4['region'], 'Île-de-France'); + $this->assertEquals($ipV4['country'], 'FR'); + $this->assertEquals($ipV4['loc'], '48.8534,2.3488'); + $this->assertEquals($ipV4['postal'], '75000'); + $this->assertEquals($ipV4['timezone'], 'Europe/Paris'); $this->assertEquals($ipV4['org'], 'AS3356 Level 3 Parent, LLC'); } }