Skip to content

Commit 7d06352

Browse files
committed
more fixes on Geoip tests
1 parent 6c185c1 commit 7d06352

File tree

1 file changed

+4
-26
lines changed

1 file changed

+4
-26
lines changed

tests/Geocoder/Tests/Provider/GeoipTest.php

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ public function testGeocodeWithLocalhostIPv4()
6262

6363
/** @var \Geocoder\Model\Address $result */
6464
$result = $results[0];
65-
$this->assertInstanceOf('\Geocoder\Model\Address', $result);
65+
$this->assertInstanceOf('Geocoder\Model\Address', $result);
6666
$this->assertNull($result->getLatitude());
6767
$this->assertNull($result->getLongitude());
6868
$this->assertNull($result->getPostalCode());
6969
$this->assertNull($result->getTimezone());
7070
$this->assertEquals('localhost', $result->getLocality());
71-
$this->assertEquals('localhost', $result->getCounty());
72-
$this->assertEquals('localhost', $result->getRegion());
73-
$this->assertEquals('localhost', $result->getCountry());
71+
$this->assertNotNull($result->getCounty());
72+
$this->assertNotNull($result->getRegion());
73+
$this->assertNotNull($result->getCountry());
7474
}
7575

7676
/**
@@ -83,28 +83,6 @@ public function testGeocodeWithLocalhostIPv6()
8383
$provider->geocode('::1');
8484
}
8585

86-
public function testGeocodeWithRealIPv4()
87-
{
88-
$provider = new Geoip();
89-
$results = $provider->geocode('74.200.247.59');
90-
91-
$this->assertInternalType('array', $results);
92-
$this->assertCount(1, $results);
93-
94-
/** @var \Geocoder\Model\Address $result */
95-
$result = $results[0];
96-
$this->assertInstanceOf('\Geocoder\Model\Address', $result);
97-
$this->assertNotNull($result->getLatitude());
98-
$this->assertNotNull($result->getLongitude());
99-
$this->assertNotNull($result->getPostalCode());
100-
$this->assertNotNull($result->getLocality());
101-
$this->assertNotNull($result->getRegion());
102-
$this->assertNotNull($result->getRegionCode());
103-
$this->assertNotNull($result->getCountry());
104-
$this->assertNotNull($result->getCountryCode());
105-
$this->assertNotNull($result->getTimezone());
106-
}
107-
10886
/**
10987
* @expectedException \Geocoder\Exception\UnsupportedOperation
11088
* @expectedExceptionMessage The Geoip provider does not support IPv6 addresses, only IPv4 addresses.

0 commit comments

Comments
 (0)