|
|
@@ -652,6 +652,20 @@ class ConsoleOptionParserTest extends TestCase
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * test addSubcommand without sorting applied.
|
|
|
+ */
|
|
|
+ public function testAddSubcommandSort()
|
|
|
+ {
|
|
|
+ $parser = new ConsoleOptionParser('test', false);
|
|
|
+ $parser->addSubcommand(new ConsoleInputSubcommand('betaTest'), [], false);
|
|
|
+ $parser->addSubcommand(new ConsoleInputSubcommand('alphaTest'), [], false);
|
|
|
+ $result = $parser->subcommands();
|
|
|
+ $this->assertCount(2, $result);
|
|
|
+ $firstResult = key($result);
|
|
|
+ $this->assertEquals('betaTest', $firstResult);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* test removeSubcommand with an object.
|
|
|
*
|
|
|
* @return void
|