diff --git a/module/CLI/test/Command/Api/GenerateKeyCommandTest.php b/module/CLI/test/Command/Api/GenerateKeyCommandTest.php index 744fb482..00548f17 100644 --- a/module/CLI/test/Command/Api/GenerateKeyCommandTest.php +++ b/module/CLI/test/Command/Api/GenerateKeyCommandTest.php @@ -55,7 +55,7 @@ class GenerateKeyCommandTest extends TestCase $this->apiKeyService->create(Argument::type(Chronos::class))->shouldBeCalledOnce() ->willReturn(new ApiKey()); $this->commandTester->execute([ - '--expirationDate' => '2016-01-01', + '--expiration-date' => '2016-01-01', ]); } } diff --git a/module/CLI/test/Command/Api/ListKeysCommandTest.php b/module/CLI/test/Command/Api/ListKeysCommandTest.php index 116f979d..e0cada5d 100644 --- a/module/CLI/test/Command/Api/ListKeysCommandTest.php +++ b/module/CLI/test/Command/Api/ListKeysCommandTest.php @@ -39,7 +39,7 @@ class ListKeysCommandTest extends TestCase { $listKeys = $this->apiKeyService->listKeys($enabledOnly)->willReturn($keys); - $this->commandTester->execute(['--enabledOnly' => $enabledOnly]); + $this->commandTester->execute(['--enabled-only' => $enabledOnly]); $output = $this->commandTester->getDisplay(); self::assertEquals($expected, $output); diff --git a/module/CLI/test/Command/ShortUrl/GenerateShortUrlCommandTest.php b/module/CLI/test/Command/ShortUrl/GenerateShortUrlCommandTest.php index 82f38713..3283dced 100644 --- a/module/CLI/test/Command/ShortUrl/GenerateShortUrlCommandTest.php +++ b/module/CLI/test/Command/ShortUrl/GenerateShortUrlCommandTest.php @@ -48,7 +48,7 @@ class GenerateShortUrlCommandTest extends TestCase $this->commandTester->execute([ 'longUrl' => 'http://domain.com/foo/bar', - '--maxVisits' => '3', + '--max-visits' => '3', ]); $output = $this->commandTester->getDisplay(); @@ -78,7 +78,7 @@ class GenerateShortUrlCommandTest extends TestCase NonUniqueSlugException::fromSlug('my-slug'), ); - $this->commandTester->execute(['longUrl' => 'http://domain.com/invalid', '--customSlug' => 'my-slug']); + $this->commandTester->execute(['longUrl' => 'http://domain.com/invalid', '--custom-slug' => 'my-slug']); $output = $this->commandTester->getDisplay(); self::assertEquals(ExitCodes::EXIT_FAILURE, $this->commandTester->getStatusCode()); diff --git a/module/CLI/test/Command/ShortUrl/GetVisitsCommandTest.php b/module/CLI/test/Command/ShortUrl/GetVisitsCommandTest.php index a4239bd2..51394414 100644 --- a/module/CLI/test/Command/ShortUrl/GetVisitsCommandTest.php +++ b/module/CLI/test/Command/ShortUrl/GetVisitsCommandTest.php @@ -71,8 +71,8 @@ class GetVisitsCommandTest extends TestCase $this->commandTester->execute([ 'shortCode' => $shortCode, - '--startDate' => $startDate, - '--endDate' => $endDate, + '--start-date' => $startDate, + '--end-date' => $endDate, ]); } @@ -86,7 +86,7 @@ class GetVisitsCommandTest extends TestCase $this->commandTester->execute([ 'shortCode' => $shortCode, - '--startDate' => $startDate, + '--start-date' => $startDate, ]); $output = $this->commandTester->getDisplay(); diff --git a/module/CLI/test/Command/ShortUrl/ListShortUrlsCommandTest.php b/module/CLI/test/Command/ShortUrl/ListShortUrlsCommandTest.php index aca72e06..43047bbf 100644 --- a/module/CLI/test/Command/ShortUrl/ListShortUrlsCommandTest.php +++ b/module/CLI/test/Command/ShortUrl/ListShortUrlsCommandTest.php @@ -104,7 +104,7 @@ class ListShortUrlsCommandTest extends TestCase ->shouldBeCalledOnce(); $this->commandTester->setInputs(['y']); - $this->commandTester->execute(['--showTags' => true]); + $this->commandTester->execute(['--show-tags' => true]); $output = $this->commandTester->getDisplay(); self::assertStringContainsString('Tags', $output); } @@ -139,22 +139,22 @@ class ListShortUrlsCommandTest extends TestCase { yield [[], 1, null, []]; yield [['--page' => $page = 3], $page, null, []]; - yield [['--searchTerm' => $searchTerm = 'search this'], 1, $searchTerm, []]; + yield [['--search-term' => $searchTerm = 'search this'], 1, $searchTerm, []]; yield [ - ['--page' => $page = 3, '--searchTerm' => $searchTerm = 'search this', '--tags' => $tags = 'foo,bar'], + ['--page' => $page = 3, '--search-term' => $searchTerm = 'search this', '--tags' => $tags = 'foo,bar'], $page, $searchTerm, explode(',', $tags), ]; yield [ - ['--startDate' => $startDate = '2019-01-01'], + ['--start-date' => $startDate = '2019-01-01'], 1, null, [], $startDate, ]; yield [ - ['--endDate' => $endDate = '2020-05-23'], + ['--end-date' => $endDate = '2020-05-23'], 1, null, [], @@ -162,7 +162,7 @@ class ListShortUrlsCommandTest extends TestCase $endDate, ]; yield [ - ['--startDate' => $startDate = '2019-01-01', '--endDate' => $endDate = '2020-05-23'], + ['--start-date' => $startDate = '2019-01-01', '--end-date' => $endDate = '2020-05-23'], 1, null, [], @@ -191,9 +191,9 @@ class ListShortUrlsCommandTest extends TestCase public function provideOrderBy(): iterable { yield [[], null]; - yield [['--orderBy' => 'foo'], 'foo']; - yield [['--orderBy' => 'foo,ASC'], ['foo' => 'ASC']]; - yield [['--orderBy' => 'bar,DESC'], ['bar' => 'DESC']]; + yield [['--order-by' => 'foo'], 'foo']; + yield [['--order-by' => 'foo,ASC'], ['foo' => 'ASC']]; + yield [['--order-by' => 'bar,DESC'], ['bar' => 'DESC']]; } /** @test */