mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-07 07:43:12 +08:00
Defined stricter model to represent one geo location
This commit is contained in:
@@ -7,6 +7,7 @@ use Doctrine\ORM\EntityManager;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Prophecy\Argument;
|
||||
use Prophecy\Prophecy\ObjectProphecy;
|
||||
use Shlinkio\Shlink\Common\IpGeolocation\Model\Location;
|
||||
use Shlinkio\Shlink\Core\Entity\ShortUrl;
|
||||
use Shlinkio\Shlink\Core\Entity\Visit;
|
||||
use Shlinkio\Shlink\Core\Entity\VisitLocation;
|
||||
@@ -31,10 +32,8 @@ class VisitServiceTest extends TestCase
|
||||
$this->visitService = new VisitService($this->em->reveal());
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function locateVisitsIteratesAndLocatesUnlocatedVisits()
|
||||
/** @test */
|
||||
public function locateVisitsIteratesAndLocatesUnlocatedVisits(): void
|
||||
{
|
||||
$unlocatedVisits = [
|
||||
[new Visit(new ShortUrl('foo'), Visitor::emptyInstance())],
|
||||
@@ -53,7 +52,7 @@ class VisitServiceTest extends TestCase
|
||||
});
|
||||
|
||||
$this->visitService->locateVisits(function () {
|
||||
return [];
|
||||
return Location::emptyInstance();
|
||||
}, function () {
|
||||
$args = func_get_args();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user