Skip to content

Commit 1d34ae7

Browse files
committed
add test for DEFAULT_COMMAND
1 parent 16f2272 commit 1d34ae7

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

system/CLI/Console.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@
2222
*/
2323
class Console
2424
{
25-
private const DEFAULT_COMMAND = 'list';
25+
/**
26+
* @internal
27+
*/
28+
public const DEFAULT_COMMAND = 'list';
2629

2730
private string $command = '';
2831

tests/system/CLI/ConsoleTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ public function testConsoleReturnsTheLastExecutedCommand(): void
165165
$console = new Console();
166166
$this->assertSame('', $console->getCommand());
167167

168+
$this->initializeConsole();
169+
$console->run();
170+
$this->assertSame(Console::DEFAULT_COMMAND, $console->getCommand());
171+
168172
$this->initializeConsole('help');
169173
$console->run();
170174
$this->assertSame('help', $console->getCommand());

0 commit comments

Comments
 (0)