Updated to readonly public props on as many models as possible

This commit is contained in:
Alejandro Celaya
2022-04-23 14:00:47 +02:00
parent e79391907a
commit bca3e62ced
74 changed files with 249 additions and 494 deletions

View File

@@ -39,7 +39,7 @@ class NonOrphanVisitsPaginatorAdapterTest extends TestCase
{
$expectedCount = 5;
$repoCount = $this->repo->countNonOrphanVisits(
new VisitsCountFiltering($this->params->getDateRange(), $this->params->excludeBots(), $this->apiKey),
new VisitsCountFiltering($this->params->dateRange, $this->params->excludeBots, $this->apiKey),
)->willReturn($expectedCount);
$result = $this->adapter->getNbResults();
@@ -57,8 +57,8 @@ class NonOrphanVisitsPaginatorAdapterTest extends TestCase
$visitor = Visitor::emptyInstance();
$list = [Visit::forRegularNotFound($visitor), Visit::forInvalidShortUrl($visitor)];
$repoFind = $this->repo->findNonOrphanVisits(new VisitsListFiltering(
$this->params->getDateRange(),
$this->params->excludeBots(),
$this->params->dateRange,
$this->params->excludeBots,
$this->apiKey,
$limit,
$offset,

View File

@@ -35,7 +35,7 @@ class OrphanVisitsPaginatorAdapterTest extends TestCase
{
$expectedCount = 5;
$repoCount = $this->repo->countOrphanVisits(
new VisitsCountFiltering($this->params->getDateRange()),
new VisitsCountFiltering($this->params->dateRange),
)->willReturn($expectedCount);
$result = $this->adapter->getNbResults();
@@ -53,7 +53,7 @@ class OrphanVisitsPaginatorAdapterTest extends TestCase
$visitor = Visitor::emptyInstance();
$list = [Visit::forRegularNotFound($visitor), Visit::forInvalidShortUrl($visitor)];
$repoFind = $this->repo->findOrphanVisits(
new VisitsListFiltering($this->params->getDateRange(), $this->params->excludeBots(), null, $limit, $offset),
new VisitsListFiltering($this->params->dateRange, $this->params->excludeBots, null, $limit, $offset),
)->willReturn($list);
$result = $this->adapter->getSlice($offset, $limit);

View File

@@ -68,7 +68,7 @@ class ShortUrlVisitsPaginatorAdapterTest extends TestCase
{
return new ShortUrlVisitsPaginatorAdapter(
$this->repo->reveal(),
new ShortUrlIdentifier(''),
ShortUrlIdentifier::fromShortCodeAndDomain(''),
VisitsParams::fromRawData([]),
$apiKey,
);