Skip to content

Commit 80648cc

Browse files
fbuchlakjbelien
andauthored
style: convert string class names to constants (#1252)
* style: convert string class names to constants * style: fix php-cs-fixer --------- Co-authored-by: Jonathan Beliën <jbelien@users.noreply.github.com>
1 parent 7183c4e commit 80648cc

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Tests/IP2LocationBinaryTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ public function testLocationResultContainsExpectedFieldsForAnAmericanIp(): void
6464
$provider = new IP2LocationBinary($this->binaryFile);
6565
$results = $provider->geocodeQuery(GeocodeQuery::create('8.8.8.8'));
6666

67-
$this->assertInstanceOf('Geocoder\Model\AddressCollection', $results);
67+
$this->assertInstanceOf(\Geocoder\Model\AddressCollection::class, $results);
6868
$this->assertCount(1, $results);
6969

7070
/** @var Location $result */
7171
$result = $results->first();
72-
$this->assertInstanceOf('\Geocoder\Model\Address', $result);
72+
$this->assertInstanceOf(\Geocoder\Model\Address::class, $result);
7373

7474
$this->assertEqualsWithDelta(37.405990600586, $result->getCoordinates()->getLatitude(), 0.001);
7575
$this->assertEqualsWithDelta(-122.07851409912, $result->getCoordinates()->getLongitude(), 0.001);
@@ -92,12 +92,12 @@ public function testLocationResultContainsExpectedFieldsForAChinaIp(): void
9292
$provider = new IP2LocationBinary($this->binaryFile);
9393
$results = $provider->geocodeQuery(GeocodeQuery::create('123.123.123.123'));
9494

95-
$this->assertInstanceOf('Geocoder\Model\AddressCollection', $results);
95+
$this->assertInstanceOf(\Geocoder\Model\AddressCollection::class, $results);
9696
$this->assertCount(1, $results);
9797

9898
/** @var Location $result */
9999
$result = $results->first();
100-
$this->assertInstanceOf('\Geocoder\Model\Address', $result);
100+
$this->assertInstanceOf(\Geocoder\Model\Address::class, $result);
101101

102102
$this->assertEqualsWithDelta(39.907501220703, $result->getCoordinates()->getLatitude(), 0.001);
103103
$this->assertEqualsWithDelta(116.39723205566, $result->getCoordinates()->getLongitude(), 0.001);
@@ -120,12 +120,12 @@ public function testGeocodeWithRealIPv6(): void
120120
$provider = new IP2LocationBinary($this->binaryFile);
121121
$results = $provider->geocodeQuery(GeocodeQuery::create('2001:4860:4860::8888'));
122122

123-
$this->assertInstanceOf('Geocoder\Model\AddressCollection', $results);
123+
$this->assertInstanceOf(\Geocoder\Model\AddressCollection::class, $results);
124124
$this->assertCount(1, $results);
125125

126126
/** @var Location $result */
127127
$result = $results->first();
128-
$this->assertInstanceOf('\Geocoder\Model\Address', $result);
128+
$this->assertInstanceOf(\Geocoder\Model\Address::class, $result);
129129

130130
$this->assertEqualsWithDelta(37.386051, $result->getCoordinates()->getLatitude(), 0.001);
131131
$this->assertEqualsWithDelta(-122.083847, $result->getCoordinates()->getLongitude(), 0.001);
@@ -151,12 +151,12 @@ public function testFindLocationByIp(string $ip, ?string $expectedCity, ?string
151151
$provider = new IP2LocationBinary($this->binaryFile);
152152
$results = $provider->geocodeQuery(GeocodeQuery::create($ip));
153153

154-
$this->assertInstanceOf('Geocoder\Model\AddressCollection', $results);
154+
$this->assertInstanceOf(\Geocoder\Model\AddressCollection::class, $results);
155155
$this->assertCount(1, $results);
156156

157157
/** @var Location $result */
158158
$result = $results->first();
159-
$this->assertInstanceOf('\Geocoder\Model\Address', $result);
159+
$this->assertInstanceOf(\Geocoder\Model\Address::class, $result);
160160
$this->assertEquals($expectedCity, $result->getLocality());
161161
$this->assertEquals($expectedCountry, $result->getCountry()->getName());
162162
}

0 commit comments

Comments
 (0)