Defined stricter model to represent one geo location

This commit is contained in:
Alejandro Celaya
2019-02-17 12:59:55 +01:00
parent 5c5dde48de
commit e2abe23895
19 changed files with 204 additions and 198 deletions

View File

@@ -4,20 +4,15 @@ declare(strict_types=1);
namespace ShlinkioTest\Shlink\Core\Entity;
use PHPUnit\Framework\TestCase;
use Shlinkio\Shlink\Common\IpGeolocation\Model\Location;
use Shlinkio\Shlink\Core\Entity\VisitLocation;
class VisitLocationTest extends TestCase
{
/**
* @test
*/
public function valuesFoundWhenExchangingArrayAreCastToString()
/** @test */
public function valuesFoundWhenExchangingArrayAreCastToString(): void
{
$payload = [
'latitude' => 1000.7,
'longitude' => -2000.4,
];
$payload = new Location('', '', '', '', 1000.7, -2000.4, '');
$location = new VisitLocation($payload);
$this->assertSame('1000.7', $location->getLatitude());