Created named constructors for Visit entity and added tracking of the visited URL

This commit is contained in:
Alejandro Celaya
2021-02-07 21:31:12 +01:00
parent f5666c9451
commit 12b07bb0ac
19 changed files with 101 additions and 60 deletions

View File

@@ -103,7 +103,7 @@ class GetVisitsCommandTest extends TestCase
$shortCode = 'abc123';
$this->visitsTracker->info(new ShortUrlIdentifier($shortCode), Argument::any())->willReturn(
new Paginator(new ArrayAdapter([
(new Visit(ShortUrl::createEmpty(), new Visitor('bar', 'foo', '')))->locate(
Visit::forValidShortUrl(ShortUrl::createEmpty(), new Visitor('bar', 'foo', '', ''))->locate(
new VisitLocation(new Location('', 'Spain', '', '', 0, 0, '')),
),
])),