Skip to content

Commit a1d19cd

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 7c9dae1 commit a1d19cd

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

Tests/HostIpTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ public function testGeocodeWithLocalhostIPv4(): void
4545
$provider = new HostIp($this->getMockedHttpClient());
4646
$results = $provider->geocodeQuery(GeocodeQuery::create('127.0.0.1'));
4747

48-
$this->assertInstanceOf('Geocoder\Model\AddressCollection', $results);
48+
$this->assertInstanceOf(\Geocoder\Model\AddressCollection::class, $results);
4949
$this->assertCount(1, $results);
5050

5151
/** @var Location $result */
5252
$result = $results->first();
53-
$this->assertInstanceOf('\Geocoder\Model\Address', $result);
53+
$this->assertInstanceOf(\Geocoder\Model\Address::class, $result);
5454
$this->assertNull($result->getCoordinates());
5555

5656
$this->assertNull($result->getPostalCode());
@@ -75,12 +75,12 @@ public function testGeocodeWithRealIPv4(): void
7575
$provider = new HostIp($this->getHttpClient());
7676
$results = $provider->geocodeQuery(GeocodeQuery::create('88.188.221.14'));
7777

78-
$this->assertInstanceOf('Geocoder\Model\AddressCollection', $results);
78+
$this->assertInstanceOf(\Geocoder\Model\AddressCollection::class, $results);
7979
$this->assertCount(1, $results);
8080

8181
/** @var Location $result */
8282
$result = $results->first();
83-
$this->assertInstanceOf('\Geocoder\Model\Address', $result);
83+
$this->assertInstanceOf(\Geocoder\Model\Address::class, $result);
8484
$this->assertEquals(null, $result->getCoordinates());
8585
$this->assertNull($result->getPostalCode());
8686
$this->assertEquals('Aulnat', $result->getLocality());
@@ -112,12 +112,12 @@ public function testGeocodeWithAnotherIp(): void
112112
$provider = new HostIp($this->getHttpClient());
113113
$results = $provider->geocodeQuery(GeocodeQuery::create('33.33.33.22'));
114114

115-
$this->assertInstanceOf('Geocoder\Model\AddressCollection', $results);
115+
$this->assertInstanceOf(\Geocoder\Model\AddressCollection::class, $results);
116116
$this->assertCount(1, $results);
117117

118118
/** @var Location $result */
119119
$result = $results->first();
120-
$this->assertInstanceOf('\Geocoder\Model\Address', $result);
120+
$this->assertInstanceOf(\Geocoder\Model\Address::class, $result);
121121
$this->assertNull($result->getCoordinates());
122122
}
123123
}

Tests/HostIpXmlTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ public function testGeocodeWithLocalhostIPv4(): void
4545
$provider = new HostIpXml($this->getMockedHttpClient());
4646
$results = $provider->geocodeQuery(GeocodeQuery::create('127.0.0.1'));
4747

48-
$this->assertInstanceOf('Geocoder\Model\AddressCollection', $results);
48+
$this->assertInstanceOf(\Geocoder\Model\AddressCollection::class, $results);
4949
$this->assertCount(1, $results);
5050

5151
/** @var Location $result */
5252
$result = $results->first();
53-
$this->assertInstanceOf('\Geocoder\Model\Address', $result);
53+
$this->assertInstanceOf(\Geocoder\Model\Address::class, $result);
5454
$this->assertNull($result->getCoordinates());
5555

5656
$this->assertNull($result->getPostalCode());
@@ -75,12 +75,12 @@ public function testGeocodeWithRealIPv4(): void
7575
$provider = new HostIpXml($this->getHttpClient());
7676
$results = $provider->geocodeQuery(GeocodeQuery::create('77.38.216.139'));
7777

78-
$this->assertInstanceOf('Geocoder\Model\AddressCollection', $results);
78+
$this->assertInstanceOf(\Geocoder\Model\AddressCollection::class, $results);
7979
$this->assertCount(1, $results);
8080

8181
/** @var Location $result */
8282
$result = $results->first();
83-
$this->assertInstanceOf('\Geocoder\Model\Address', $result);
83+
$this->assertInstanceOf(\Geocoder\Model\Address::class, $result);
8484
$this->assertEqualsWithDelta(56.8833, $result->getCoordinates()->getLatitude(), 0.0001);
8585
$this->assertEqualsWithDelta(24.0833, $result->getCoordinates()->getLongitude(), 0.0001);
8686
$this->assertNull($result->getPostalCode());
@@ -113,12 +113,12 @@ public function testGeocodeWithAnotherIp(): void
113113
$provider = new HostIpXml($this->getHttpClient());
114114
$results = $provider->geocodeQuery(GeocodeQuery::create('33.33.33.22'));
115115

116-
$this->assertInstanceOf('Geocoder\Model\AddressCollection', $results);
116+
$this->assertInstanceOf(\Geocoder\Model\AddressCollection::class, $results);
117117
$this->assertCount(1, $results);
118118

119119
/** @var Location $result */
120120
$result = $results->first();
121-
$this->assertInstanceOf('\Geocoder\Model\Address', $result);
121+
$this->assertInstanceOf(\Geocoder\Model\Address::class, $result);
122122
$this->assertNull($result->getCoordinates());
123123
}
124124
}

0 commit comments

Comments
 (0)