mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-12 01:54:41 +08:00
Improve some console commands coverage
This commit is contained in:
@@ -50,6 +50,19 @@ class GetShortUrlVisitsCommandTest extends TestCase
|
||||
$this->commandTester->execute(['shortCode' => $shortCode]);
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function shortCodeIsAskedIfNotProvided(): void
|
||||
{
|
||||
$shortCode = 'abc123';
|
||||
$this->visitsHelper->expects($this->once())->method('visitsForShortUrl')->with(
|
||||
ShortUrlIdentifier::fromShortCodeAndDomain($shortCode),
|
||||
$this->anything(),
|
||||
)->willReturn(new Paginator(new ArrayAdapter([])));
|
||||
|
||||
$this->commandTester->setInputs([$shortCode]);
|
||||
$this->commandTester->execute([]);
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function providingDateFlagsTheListGetsFiltered(): void
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user