@@ -31,22 +31,20 @@ public function testGetName()
3131 $ this ->assertEquals ('ip_info ' , $ provider ->getName ());
3232 }
3333
34- /**
35- * @expectedException \Geocoder\Exception\UnsupportedOperation
36- * @expectedExceptionMessage The IpInfo provider does not support street addresses, only IP addresses.
37- */
3834 public function testGeocodeWithRandomString ()
3935 {
36+ $ this ->expectException (\Geocoder \Exception \UnsupportedOperation::class);
37+ $ this ->expectExceptionMessage ('The IpInfo provider does not support street addresses, only IP addresses. ' );
38+
4039 $ provider = new IpInfo ($ this ->getMockedHttpClient ());
4140 $ provider ->geocodeQuery (GeocodeQuery::create ('foobar ' ));
4241 }
4342
44- /**
45- * @expectedException \Geocoder\Exception\UnsupportedOperation
46- * @expectedExceptionMessage The IpInfo provider does not support street addresses, only IP addresses.
47- */
4843 public function testGeocodeWithAddress ()
4944 {
45+ $ this ->expectException (\Geocoder \Exception \UnsupportedOperation::class);
46+ $ this ->expectExceptionMessage ('The IpInfo provider does not support street addresses, only IP addresses. ' );
47+
5048 $ provider = new IpInfo ($ this ->getMockedHttpClient ());
5149 $ provider ->geocodeQuery (GeocodeQuery::create ('10 avenue Gambetta, Paris, France ' ));
5250 }
@@ -79,11 +77,10 @@ public function provideLocalhostIps()
7977 yield ['::1 ' ];
8078 }
8179
82- /**
83- * @expectedException \Geocoder\Exception\InvalidServerResponse
84- */
8580 public function testGeocodeWithRealIPv4GetsNullContent ()
8681 {
82+ $ this ->expectException (\Geocoder \Exception \InvalidServerResponse::class);
83+
8784 $ provider = new IpInfo ($ this ->getMockedHttpClient ());
8885 $ provider ->geocodeQuery (GeocodeQuery::create ('74.125.45.100 ' ));
8986 }
@@ -130,12 +127,11 @@ public function testGeocodeWithRealIPv6()
130127 $ this ->assertNull ($ result ->getTimezone ());
131128 }
132129
133- /**
134- * @expectedException \Geocoder\Exception\UnsupportedOperation
135- * @expectedExceptionMessage The IpInfo provider is not able to do reverse geocoding.
136- */
137130 public function testReverse ()
138131 {
132+ $ this ->expectException (\Geocoder \Exception \UnsupportedOperation::class);
133+ $ this ->expectExceptionMessage ('The IpInfo provider is not able to do reverse geocoding. ' );
134+
139135 $ provider = new IpInfo ($ this ->getMockedHttpClient ());
140136 $ provider ->reverseQuery (ReverseQuery::fromCoordinates (0 , 0 ));
141137 }
0 commit comments