comparison vendor/pear/console_commandline/tests/console_commandline_addcommand_3.phpt @ 0:1e000243b222

vanilla 1.3.3 distro, I hope
author Charlie Root
date Thu, 04 Jan 2018 15:50:29 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:1e000243b222
1 --TEST--
2 Test for Console_CommandLine::addCommand() method.
3 --ARGS--
4 --FILE--
5 <?php
6
7 require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'tests.inc.php';
8
9 $parser = new Console_CommandLine(array('subcommand_required' => true));
10 $parser->addCommand('cmd1');
11 $parser->addCommand('cmd2');
12 $parser->addCommand('cmd3');
13 try {
14 $parser->parse();
15 } catch (Console_CommandLine_Exception $exc) {
16 echo $exc->getMessage();
17 }
18
19 ?>
20 --EXPECTF--
21 Please enter one of the following command: cmd1, cmd2, cmd3.