diff --git a/.github/workflows/phpunit.yaml b/.github/workflows/phpunit.yaml index 752531f..69d8c79 100644 --- a/.github/workflows/phpunit.yaml +++ b/.github/workflows/phpunit.yaml @@ -50,8 +50,8 @@ jobs: run: /usr/local/bin/phpunit --coverage-html=coverage - name: Archive code coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: code-coverage-report + name: code-coverage-report-${{ matrix.php-versions }}-${{ matrix.phpunit-versions }}-${{ matrix.operating-system }} path: coverage/ retention-days: 90 diff --git a/tests/IPinfoTest.php b/tests/IPinfoTest.php index 1874b33..2116f4e 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'); $this->assertEquals($res->asn['asn'], 'AS15169'); @@ -191,55 +191,6 @@ public function testGetBatchDetails() $this->assertArrayHasKey('9.9.9.9', $res); $this->assertArrayHasKey('10.10.10.10', $res); $this->assertEquals($res['8.8.8.8/hostname'], 'dns.google'); - $this->assertEquals($res['4.4.4.4'], [ - 'ip' => "4.4.4.4", - 'city' => 'Broomfield', - 'region' => 'Colorado', - 'country' => 'US', - 'loc' => '39.8854,-105.1139', - 'postal' => '80021', - 'timezone' => 'America/Denver', - 'asn' => [ - 'asn' => "AS3356", - 'name' => "Level 3 Parent, LLC", - 'domain' => "lumen.com", - 'route' => "4.0.0.0/9", - 'type' => "isp" - ], - 'company' => [ - 'name' => "Level 3 Communications, Inc.", - 'domain' => "lumen.com", - 'type' => "isp" - ], - 'privacy' => [ - 'vpn' => false, - 'proxy' => false, - 'tor' => false, - 'relay' => false, - 'hosting' => false, - 'service' => "" - ], - 'abuse' => [ - 'address' => "US, LA, Monroe, 100 CenturyLink Drive, 71203", - 'country' => "US", - 'email' => "abuse@level3.com", - 'name' => "L3 Abuse Contact", - 'network' => "4.4.0.0/16", - 'phone' => "+1-877-453-8353" - ], - 'domains' => [ - 'ip' => "4.4.4.4", - 'total' => 120, - 'domains' => [ - 'ncrsaas.com', - 'ampuroci.com', - 'bachkhoasupply.com', - 'dc-scape.com', - 'bfgroup.kz', - ] - ], - 'org' => 'AS3356 Level 3 Parent, LLC', - ]); $this->assertEquals($res['AS123'], [ 'asn' => "AS123",