Map models in CLI via TreeMapper

This commit is contained in:
Alejandro Celaya committed 2026-05-10 09:04:30 +02:00
1 parent c162bb6145
commit a4f39c18eb
14 files changed
+108 -197

No files matched your search

@@ -54,12 +54,9 @@ final readonly class ShortUrlsParams
normalizeOptionalDate($startDate),
normalizeOptionalDate($endDate),
);
// FIXME When using shlink-common, TagsConverter implicitly does an array_unique.
$this->tags = array_unique($tags);
$this->excludeTags = array_unique($excludeTags);
}
public static function empty(): self
{
return new self();
}
}
@@ -42,7 +42,7 @@ class ShortUrlListServiceTest extends TestCase
$this->repo->expects($this->once())->method('findList')->willReturn($list);
$this->repo->expects($this->once())->method('countList')->willReturn(count($list));
$paginator = $this->service->listShortUrls(ShortUrlsParams::empty(), $apiKey);
$paginator = $this->service->listShortUrls(new ShortUrlsParams(), $apiKey);
self::assertCount(4, $paginator);
self::assertCount(4, $paginator->getCurrentPageResults());