diff --git a/tests/CacheTest.php b/tests/CacheTest.php index 3440ae8..5a7e8fb 100644 --- a/tests/CacheTest.php +++ b/tests/CacheTest.php @@ -6,9 +6,7 @@ class CacheTest extends TestCase { - /** - * @test - */ + /** @test */ public function shouldReturnValidLocation() { $data = [ @@ -34,9 +32,7 @@ public function shouldReturnValidLocation() $this->assertEquals($location->default, false); } - /** - * @test - */ + /** @test */ public function shouldReturnInvalidLocation() { $cacheMock = Mockery::mock('Illuminate\Cache\CacheManager') @@ -55,9 +51,7 @@ public function shouldReturnInvalidLocation() $this->assertEquals($geo_ip->getCache()->get('81.2.69.142'), null); } - /** - * @test - */ + /** @test */ public function shouldSetLocation() { $location = new \InteractionDesignFoundation\GeoIP\Location([ @@ -83,9 +77,7 @@ public function shouldSetLocation() $this->assertEquals($geo_ip->getCache()->set('81.2.69.142', $location), null); } - /** - * @test - */ + /** @test */ public function shouldFlushLocations() { $cacheMock = Mockery::mock('Illuminate\Cache\CacheManager') diff --git a/tests/GeoIPTest.php b/tests/GeoIPTest.php index 83d6c3e..6c65161 100644 --- a/tests/GeoIPTest.php +++ b/tests/GeoIPTest.php @@ -6,9 +6,7 @@ class GeoIPTest extends TestCase { - /** - * @test - */ + /** @test */ public function shouldGetUSDCurrency() { $geo_ip = $this->makeGeoIP(); @@ -16,9 +14,7 @@ public function shouldGetUSDCurrency() $this->assertEquals($geo_ip->getCurrency('US'), 'USD'); } - /** - * @test - */ + /** @test */ public function testGetService() { $geo_ip = $this->makeGeoIP([ @@ -32,9 +28,7 @@ public function testGetService() $this->assertInstanceOf(\InteractionDesignFoundation\GeoIP\Contracts\ServiceInterface::class, $geo_ip->getService()); } - /** - * @test - */ + /** @test */ public function testGetCache() { $geo_ip = $this->makeGeoIP(); diff --git a/tests/Services/MaxMindDatabaseTest.php b/tests/Services/MaxMindDatabaseTest.php index 9de83a9..870a0aa 100644 --- a/tests/Services/MaxMindDatabaseTest.php +++ b/tests/Services/MaxMindDatabaseTest.php @@ -6,9 +6,7 @@ class MaxMindDatabaseTest extends TestCase { - /** - * @test - */ + /** @test */ public function shouldReturnConfigValue() { list($service, $config) = $this->getService(); @@ -16,9 +14,7 @@ public function shouldReturnConfigValue() $this->assertEquals($service->config('database_path'), $config['database_path']); } - /** - * @test - */ + /** @test */ public function shouldReturnValidLocation() { list($service, $config) = $this->getService(); @@ -30,9 +26,7 @@ public function shouldReturnValidLocation() $this->assertEquals($location->default, false); } - /** - * @test - */ + /** @test */ public function shouldReturnInvalidLocation() { list($service, $config) = $this->getService(); @@ -46,7 +40,8 @@ public function shouldReturnInvalidLocation() } } - protected function getService() + /** @return list{\InteractionDesignFoundation\GeoIP\Contracts\ServiceInterface, array} */ + protected function getService(): array { $config = $this->getConfig()['services']['maxmind_database'];