mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-17 15:59:56 +03:00
Added test for short URLs with all items
This commit is contained in:
parent
8e84b0e8ac
commit
5f9b629676
1 changed files with 18 additions and 0 deletions
|
@ -192,4 +192,22 @@ class ListShortUrlsCommandTest extends TestCase
|
||||||
yield [['--orderBy' => 'foo,ASC'], ['foo' => 'ASC']];
|
yield [['--orderBy' => 'foo,ASC'], ['foo' => 'ASC']];
|
||||||
yield [['--orderBy' => 'bar,DESC'], ['bar' => 'DESC']];
|
yield [['--orderBy' => 'bar,DESC'], ['bar' => 'DESC']];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @test */
|
||||||
|
public function requestingAllElementsWillSetItemsPerPage(): void
|
||||||
|
{
|
||||||
|
$listShortUrls = $this->shortUrlService->listShortUrls(ShortUrlsParams::fromRawData([
|
||||||
|
'page' => 1,
|
||||||
|
'searchTerm' => null,
|
||||||
|
'tags' => [],
|
||||||
|
'startDate' => null,
|
||||||
|
'endDate' => null,
|
||||||
|
'orderBy' => null,
|
||||||
|
'itemsPerPage' => -1,
|
||||||
|
]))->willReturn(new Paginator(new ArrayAdapter()));
|
||||||
|
|
||||||
|
$this->commandTester->execute(['--all' => true]);
|
||||||
|
|
||||||
|
$listShortUrls->shouldHaveBeenCalledOnce();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue