mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-28 17:08:58 +03:00
21 lines
609 B
PHP
21 lines
609 B
PHP
<?php
|
|
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(): void
|
|
{
|
|
$payload = new Location('', '', '', '', 1000.7, -2000.4, '');
|
|
$location = new VisitLocation($payload);
|
|
|
|
$this->assertSame('1000.7', $location->getLatitude());
|
|
$this->assertSame('-2000.4', $location->getLongitude());
|
|
}
|
|
}
|