diff --git a/CHANGELOG.md b/CHANGELOG.md index 4dc88849..a397f3af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com), and this * [#2077](https://github.com/shlinkio/shlink/issues/2077) When sending visits to Matomo, the short URL title is now used as document title in matomo. * [#2059](https://github.com/shlinkio/shlink/issues/2059) Add new `short-url:delete-expired` command that can be used to programmatically delete expired short URLs. - Expired short URLs are those that have a `calidUntil` date in the past, or optionally, that have reached the max amount of visits. + Expired short URLs are those that have a `validUntil` date in the past, or optionally, that have reached the max amount of visits. This command can be run periodically by those who create many disposable URLs which are valid only for a period of time, and then can be deleted to save space. diff --git a/module/CLI/test/Command/ShortUrl/DeleteExpiredShortUrlsCommandTest.php b/module/CLI/test/Command/ShortUrl/DeleteExpiredShortUrlsCommandTest.php index 5930a93c..ea580064 100644 --- a/module/CLI/test/Command/ShortUrl/DeleteExpiredShortUrlsCommandTest.php +++ b/module/CLI/test/Command/ShortUrl/DeleteExpiredShortUrlsCommandTest.php @@ -42,16 +42,17 @@ class DeleteExpiredShortUrlsCommandTest extends TestCase } #[Test] - #[TestWith([[], true])] - #[TestWith([['--force' => true], false])] - #[TestWith([['-f' => true], false])] - public function deletionIsExecutedByDefault(array $input, bool $expectsWarning): void + #[TestWith([[], [], true])] + #[TestWith([['--force' => true], [], false])] + #[TestWith([['-f' => true], [], false])] + #[TestWith([[], ['interactive' => false], false])] + public function deletionIsExecutedByDefault(array $input, array $options, bool $expectsWarning): void { $this->service->expects($this->never())->method('countExpiredShortUrls'); $this->service->expects($this->once())->method('deleteExpiredShortUrls')->willReturn(5); $this->commandTester->setInputs(['y']); - $this->commandTester->execute($input); + $this->commandTester->execute($input, $options); $output = $this->commandTester->getDisplay(); $status = $this->commandTester->getStatusCode();