@@ -48,12 +48,11 @@ public static function provideIps()
4848 ];
4949 }
5050
51- /**
52- * @expectedException \Geocoder\Exception\InvalidArgument
53- * @expectedExceptionMessage Given IP2Location BIN file "NOT_EXIST.BIN" does not exist.
54- */
5551 public function testThrowIfNotExistBinaryFileGiven ()
5652 {
53+ $ this ->expectException (\Geocoder \Exception \InvalidArgument::class);
54+ $ this ->expectExceptionMessage ('Given IP2Location BIN file "NOT_EXIST.BIN" does not exist. ' );
55+
5756 new IP2LocationBinary ('NOT_EXIST.BIN ' );
5857 }
5958
@@ -166,23 +165,21 @@ public function testGetName()
166165 $ this ->assertEquals ('ip2location_binary ' , $ provider ->getName ());
167166 }
168167
169- /**
170- * @expectedException \Geocoder\Exception\UnsupportedOperation
171- * @expectedExceptionMessage The IP2LocationBinary provider does not support street addresses.
172- */
173168 public function testThrowIfInvalidIpAddressGiven ()
174169 {
170+ $ this ->expectException (\Geocoder \Exception \UnsupportedOperation::class);
171+ $ this ->expectExceptionMessage ('The IP2LocationBinary provider does not support street addresses. ' );
172+
175173 $ provider = new IP2LocationBinary ($ this ->binaryFile );
176174
177175 $ provider ->geocodeQuery (GeocodeQuery::create ('invalidIp ' ));
178176 }
179177
180- /**
181- * @expectedException \Geocoder\Exception\UnsupportedOperation
182- * @expectedExceptionMessage The IP2LocationBinary is not able to do reverse geocoding.
183- */
184178 public function testThrowOnReverseMethodUsage ()
185179 {
180+ $ this ->expectException (\Geocoder \Exception \UnsupportedOperation::class);
181+ $ this ->expectExceptionMessage ('The IP2LocationBinary is not able to do reverse geocoding. ' );
182+
186183 $ provider = new IP2LocationBinary ($ this ->binaryFile );
187184
188185 $ provider ->reverseQuery (ReverseQuery::fromCoordinates (0 , 0 ));
0 commit comments