Improved public API in Visit entity, reducing anemic model

This commit is contained in:
Alejandro Celaya
2018-10-28 16:20:10 +01:00
parent 8e1e8ba7de
commit 951d08f914
9 changed files with 60 additions and 94 deletions

View File

@@ -80,8 +80,8 @@ class VisitsTrackerTest extends TestCase
$this->em->getRepository(ShortUrl::class)->willReturn($repo->reveal())->shouldBeCalledTimes(1);
$list = [
new Visit(),
new Visit(),
new Visit(new ShortUrl(''), Visitor::emptyInstance()),
new Visit(new ShortUrl(''), Visitor::emptyInstance()),
];
$repo2 = $this->prophesize(VisitRepository::class);
$repo2->findVisitsByShortUrl($shortUrl, null)->willReturn($list);