/** * test removeSubcommand with an object. * * @return void */ public function testRemoveSubcommand() { $parser = new ConsoleOptionParser('test', FALSE); $parser->addSubcommand(new ConsoleInputSubcommand('test')); $result = $parser->subcommands(); $this->assertEquals(1, count($result)); $parser->removeSubcommand('test'); $result = $parser->subcommands(); $this->assertEquals(0, count($result), 'Remove a subcommand does not work'); }