Skip to content

Commit 5a1fd7d

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 ebf5ad0 commit 5a1fd7d

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

Tests/BingMapsTest.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ public function testGeocodeReturnsMultipleResults(): void
7070
$provider = new BingMaps($this->getMockedHttpClient($json), 'api_key');
7171
$results = $provider->geocodeQuery(GeocodeQuery::create('10 avenue Gambetta, Paris, France'));
7272

73-
$this->assertInstanceOf('Geocoder\Model\AddressCollection', $results);
73+
$this->assertInstanceOf(\Geocoder\Model\AddressCollection::class, $results);
7474
$this->assertCount(3, $results);
7575

7676
/** @var Location $result */
7777
$result = $results->first();
78-
$this->assertInstanceOf('\Geocoder\Model\Address', $result);
78+
$this->assertInstanceOf(\Geocoder\Model\Address::class, $result);
7979
$this->assertEqualsWithDelta(48.86321675999999, $result->getCoordinates()->getLatitude(), 0.01);
8080
$this->assertEqualsWithDelta(2.3887721299999995, $result->getCoordinates()->getLongitude(), 0.01);
8181
$this->assertNotNull($result->getBounds());
@@ -97,7 +97,7 @@ public function testGeocodeReturnsMultipleResults(): void
9797

9898
/** @var Location $result */
9999
$result = $results->get(1);
100-
$this->assertInstanceOf('\Geocoder\Model\Address', $result);
100+
$this->assertInstanceOf(\Geocoder\Model\Address::class, $result);
101101
$this->assertEqualsWithDelta(48.81342781, $result->getCoordinates()->getLatitude(), 0.01);
102102
$this->assertEqualsWithDelta(2.32503767, $result->getCoordinates()->getLongitude(), 0.01);
103103
$this->assertNotNull($result->getBounds());
@@ -117,7 +117,7 @@ public function testGeocodeReturnsMultipleResults(): void
117117

118118
/** @var Location $result */
119119
$result = $results->get(2);
120-
$this->assertInstanceOf('\Geocoder\Model\Address', $result);
120+
$this->assertInstanceOf(\Geocoder\Model\Address::class, $result);
121121
$this->assertEqualsWithDelta(48.81014147, $result->getCoordinates()->getLatitude(), 0.01);
122122
$this->assertEqualsWithDelta(2.43568048, $result->getCoordinates()->getLongitude(), 0.01);
123123
$this->assertNotNull($result->getBounds());
@@ -145,12 +145,12 @@ public function testReverseReturnsSingleResult(): void
145145
$provider = new BingMaps($this->getMockedHttpClient($json), 'api_key');
146146
$results = $provider->reverseQuery(ReverseQuery::fromCoordinates(48.86321648955345, 2.3887719959020615));
147147

148-
$this->assertInstanceOf('Geocoder\Model\AddressCollection', $results);
148+
$this->assertInstanceOf(\Geocoder\Model\AddressCollection::class, $results);
149149
$this->assertCount(1, $results);
150150

151151
/** @var Location $result */
152152
$result = $results->first();
153-
$this->assertInstanceOf('\Geocoder\Model\Address', $result);
153+
$this->assertInstanceOf(\Geocoder\Model\Address::class, $result);
154154
$this->assertEqualsWithDelta(48.86321648955345, $result->getCoordinates()->getLatitude(), 0.0001);
155155
$this->assertEqualsWithDelta(2.3887719959020615, $result->getCoordinates()->getLongitude(), 0.0001);
156156
$this->assertNotNull($result->getBounds());
@@ -180,12 +180,12 @@ public function testGeocodeWithRealAddressReturnsSingleResults(): void
180180
$provider = new BingMaps($this->getHttpClient($_SERVER['BINGMAPS_API_KEY']), $_SERVER['BINGMAPS_API_KEY']);
181181
$results = $provider->geocodeQuery(GeocodeQuery::create('10 avenue Gambetta, Paris, France')->withLocale('fr-FR'));
182182

183-
$this->assertInstanceOf('Geocoder\Model\AddressCollection', $results);
183+
$this->assertInstanceOf(\Geocoder\Model\AddressCollection::class, $results);
184184
$this->assertCount(1, $results);
185185

186186
/** @var Location $result */
187187
$result = $results->first();
188-
$this->assertInstanceOf('\Geocoder\Model\Address', $result);
188+
$this->assertInstanceOf(\Geocoder\Model\Address::class, $result);
189189
$this->assertEqualsWithDelta(48.86321675999999, $result->getCoordinates()->getLatitude(), 0.01);
190190
$this->assertEqualsWithDelta(2.3887721299999995, $result->getCoordinates()->getLongitude(), 0.01);
191191
$this->assertNotNull($result->getBounds());
@@ -217,7 +217,7 @@ public function testGeocodeWithRealAddressReturnsMultipleResults(): void
217217
$provider = new BingMaps($this->getHttpClient($_SERVER['BINGMAPS_API_KEY']), $_SERVER['BINGMAPS_API_KEY']);
218218
$results = $provider->geocodeQuery(GeocodeQuery::create('Castelnuovo, Italie')->withLocale('fr-FR'));
219219

220-
$this->assertInstanceOf('Geocoder\Model\AddressCollection', $results);
220+
$this->assertInstanceOf(\Geocoder\Model\AddressCollection::class, $results);
221221
$this->assertCount(5, $results);
222222
}
223223

@@ -230,12 +230,12 @@ public function testReverseWithRealCoordinatesReturnsSingleResult(): void
230230
$provider = new BingMaps($this->getHttpClient($_SERVER['BINGMAPS_API_KEY']), $_SERVER['BINGMAPS_API_KEY']);
231231
$results = $provider->reverseQuery(ReverseQuery::fromCoordinates(48.86321648955345, 2.3887719959020615));
232232

233-
$this->assertInstanceOf('Geocoder\Model\AddressCollection', $results);
233+
$this->assertInstanceOf(\Geocoder\Model\AddressCollection::class, $results);
234234
$this->assertCount(1, $results);
235235

236236
/** @var Location $result */
237237
$result = $results->first();
238-
$this->assertInstanceOf('\Geocoder\Model\Address', $result);
238+
$this->assertInstanceOf(\Geocoder\Model\Address::class, $result);
239239
$this->assertEqualsWithDelta(48.86321648955345, $result->getCoordinates()->getLatitude(), 0.0001);
240240
$this->assertEqualsWithDelta(2.3887719959020615, $result->getCoordinates()->getLongitude(), 0.0001);
241241
$this->assertNotNull($result->getBounds());

0 commit comments

Comments
 (0)