Package-update-patch
Update Torann/GeoIP package from 0.2 to 1.0.0 which is being used to show country code in phone nuber in various forms.
This commit is contained in:
46
vendor/torann/geoip/tests/GeoIPTest.php
vendored
Normal file
46
vendor/torann/geoip/tests/GeoIPTest.php
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace Torann\GeoIP\Tests;
|
||||
|
||||
use Mockery;
|
||||
|
||||
class GeoIPTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function shouldGetUSDCurrency()
|
||||
{
|
||||
$geo_ip = $this->makeGeoIP();
|
||||
|
||||
$this->assertEquals($geo_ip->getCurrency('US'), 'USD');
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function testGetService()
|
||||
{
|
||||
$geo_ip = $this->makeGeoIP([
|
||||
'service' => 'maxmind_database',
|
||||
]);
|
||||
|
||||
// Get config values
|
||||
$config = $this->getConfig()['services']['maxmind_database'];
|
||||
unset($config['class']);
|
||||
|
||||
self::$functions->shouldReceive('app')->with('Torann\GeoIP\Services\MaxMindDatabase', [$config])->andReturn(true);
|
||||
|
||||
$this->assertEquals($geo_ip->getService(), true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function testGetCache()
|
||||
{
|
||||
$geo_ip = $this->makeGeoIP();
|
||||
|
||||
$this->assertInstanceOf(\Torann\GeoIP\Cache::class, $geo_ip->getCache());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user