From 27b680e0cdfda223d386c4a314554cf4727dc5a6 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Thu, 6 Oct 2022 21:01:11 +0200 Subject: [PATCH] Created CLI test for short URLs list --- .../test-cli/Command/ListShortUrlsTest.php | 66 +++++++++++++++++++ module/Rest/src/ApiKey/Role.php | 2 - 2 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 module/CLI/test-cli/Command/ListShortUrlsTest.php diff --git a/module/CLI/test-cli/Command/ListShortUrlsTest.php b/module/CLI/test-cli/Command/ListShortUrlsTest.php new file mode 100644 index 00000000..faa47a2f --- /dev/null +++ b/module/CLI/test-cli/Command/ListShortUrlsTest.php @@ -0,0 +1,66 @@ +exec([ListShortUrlsCommand::NAME, ...$flags], ['no']); + self::assertStringContainsString($expectedOutput, $output); + } + + public function provideFlagsAndOutput(): iterable + { + // phpcs:disable Generic.Files.LineLength + yield 'no flags' => [[], << [['--start-date=2019-01'], << [['-e 2018-12-01'], << [['-s 2018-06-20', '--end-date=2019-01-01T00:00:20+00:00'], <<