mirror of
https://github.com/shlinkio/shlink.git
synced 2026-11-02 20:30:15 -06:00
Map models in CLI via TreeMapper
This commit is contained in:
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());
|
||||
|
||||
Reference in new issue
Block a user