File tree Expand file tree Collapse file tree 3 files changed +12
-31
lines changed Expand file tree Collapse file tree 3 files changed +12
-31
lines changed Original file line number Diff line number Diff line change 66
77class CacheTest extends TestCase
88{
9- /**
10- * @test
11- */
9+ /** @test */
1210 public function shouldReturnValidLocation ()
1311 {
1412 $ data = [
@@ -34,9 +32,7 @@ public function shouldReturnValidLocation()
3432 $ this ->assertEquals ($ location ->default , false );
3533 }
3634
37- /**
38- * @test
39- */
35+ /** @test */
4036 public function shouldReturnInvalidLocation ()
4137 {
4238 $ cacheMock = Mockery::mock ('Illuminate\Cache\CacheManager ' )
@@ -55,9 +51,7 @@ public function shouldReturnInvalidLocation()
5551 $ this ->assertEquals ($ geo_ip ->getCache ()->get ('81.2.69.142 ' ), null );
5652 }
5753
58- /**
59- * @test
60- */
54+ /** @test */
6155 public function shouldSetLocation ()
6256 {
6357 $ location = new \InteractionDesignFoundation \GeoIP \Location ([
@@ -83,9 +77,7 @@ public function shouldSetLocation()
8377 $ this ->assertEquals ($ geo_ip ->getCache ()->set ('81.2.69.142 ' , $ location ), null );
8478 }
8579
86- /**
87- * @test
88- */
80+ /** @test */
8981 public function shouldFlushLocations ()
9082 {
9183 $ cacheMock = Mockery::mock ('Illuminate\Cache\CacheManager ' )
Original file line number Diff line number Diff line change 66
77class GeoIPTest extends TestCase
88{
9- /**
10- * @test
11- */
9+ /** @test */
1210 public function shouldGetUSDCurrency ()
1311 {
1412 $ geo_ip = $ this ->makeGeoIP ();
1513
1614 $ this ->assertEquals ($ geo_ip ->getCurrency ('US ' ), 'USD ' );
1715 }
1816
19- /**
20- * @test
21- */
17+ /** @test */
2218 public function testGetService ()
2319 {
2420 $ geo_ip = $ this ->makeGeoIP ([
@@ -32,9 +28,7 @@ public function testGetService()
3228 $ this ->assertInstanceOf (\InteractionDesignFoundation \GeoIP \Contracts \ServiceInterface::class, $ geo_ip ->getService ());
3329 }
3430
35- /**
36- * @test
37- */
31+ /** @test */
3832 public function testGetCache ()
3933 {
4034 $ geo_ip = $ this ->makeGeoIP ();
Original file line number Diff line number Diff line change 66
77class MaxMindDatabaseTest extends TestCase
88{
9- /**
10- * @test
11- */
9+ /** @test */
1210 public function shouldReturnConfigValue ()
1311 {
1412 list ($ service , $ config ) = $ this ->getService ();
1513
1614 $ this ->assertEquals ($ service ->config ('database_path ' ), $ config ['database_path ' ]);
1715 }
1816
19- /**
20- * @test
21- */
17+ /** @test */
2218 public function shouldReturnValidLocation ()
2319 {
2420 list ($ service , $ config ) = $ this ->getService ();
@@ -30,9 +26,7 @@ public function shouldReturnValidLocation()
3026 $ this ->assertEquals ($ location ->default , false );
3127 }
3228
33- /**
34- * @test
35- */
29+ /** @test */
3630 public function shouldReturnInvalidLocation ()
3731 {
3832 list ($ service , $ config ) = $ this ->getService ();
@@ -46,7 +40,8 @@ public function shouldReturnInvalidLocation()
4640 }
4741 }
4842
49- protected function getService ()
43+ /** @return list{\InteractionDesignFoundation\GeoIP\Contracts\ServiceInterface, array<string, mixed>} */
44+ protected function getService (): array
5045 {
5146 $ config = $ this ->getConfig ()['services ' ]['maxmind_database ' ];
5247
You can’t perform that action at this time.
0 commit comments