Skip to content

Commit

Permalink
refactor: remove unneeded logic
Browse files Browse the repository at this point in the history
It seems out of dated logic.
  • Loading branch information
kenjis committed Mar 28, 2022
1 parent a5dbddd commit 6efb121
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
5 changes: 0 additions & 5 deletions system/CLI/CommandRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@ public function __construct()
*/
public function _remap($method, $params)
{
// The first param is usually empty, so scrap it.
if (empty($params[0])) {
array_shift($params);
}

return $this->index($params);
}

Expand Down
12 changes: 0 additions & 12 deletions tests/system/CLI/CommandRunnerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,16 +117,4 @@ public function testBadCommand()
// make sure the result looks like a command list
$this->assertStringContainsString('Command "bogus" not found', CITestStreamFilter::$buffer);
}

/**
* @TODO When the first param is empty? Use case?
*/
public function testRemapEmptyFirstParams()
{
self::$runner->_remap('anyvalue', [null, 'list']);
$result = CITestStreamFilter::$buffer;

// make sure the result looks like a command list
$this->assertStringContainsString('Lists the available commands.', $result);
}
}

0 comments on commit 6efb121

Please sign in to comment.