From 4ca4e38ca529ff71eafdf99492832f2caec1ecaa Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Mon, 13 Jul 2020 20:33:43 +0700 Subject: [PATCH] add test for CommandRunner::_remap() with empty first params --- tests/system/CLI/CommandRunnerTest.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/system/CLI/CommandRunnerTest.php b/tests/system/CLI/CommandRunnerTest.php index d21b04c54123..cc14b26e0eb1 100644 --- a/tests/system/CLI/CommandRunnerTest.php +++ b/tests/system/CLI/CommandRunnerTest.php @@ -125,4 +125,13 @@ public function testBadCommand() $this->assertStringContainsString('Command "bogus" not found', $result); } + public function testRemapEmptyFirstParams() + { + $this->runner->_remap('anyvalue', null, 'list'); + $result = CITestStreamFilter::$buffer; + + // make sure the result looks like a command list + $this->assertStringContainsString('Lists the available commands.', $result); + } + }