Refactor Visitor model and allow a Location object to be passed to it

This commit is contained in:
Alejandro Celaya
2024-11-14 14:48:18 +01:00
parent 1fee745786
commit 4a0b7e3fc9
17 changed files with 131 additions and 87 deletions

View File

@@ -40,7 +40,7 @@ class GetDomainVisitsCommandTest extends TestCase
public function outputIsProperlyGenerated(): void
{
$shortUrl = ShortUrl::createFake();
$visit = Visit::forValidShortUrl($shortUrl, new Visitor('bar', 'foo', '', ''))->locate(
$visit = Visit::forValidShortUrl($shortUrl, Visitor::fromParams('bar', 'foo', ''))->locate(
VisitLocation::fromGeolocation(new Location('', 'Spain', '', 'Madrid', 0, 0, '')),
);
$domain = 's.test';