comparison vendor/pear/console_commandline/tests/console_commandline_parse_10.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::parse() method (subcommand).
3 --SKIPIF--
4 <?php if(php_sapi_name()!='cli') echo 'skip'; ?>
5 --ARGS--
6 -v install -f foo
7 --FILE--
8 <?php
9
10 require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'tests.inc.php';
11
12 $parser = buildParser2();
13 $result = $parser->parse();
14 var_dump($result->options);
15 var_dump($result->command_name);
16 var_dump($result->command->options);
17
18 ?>
19 --EXPECT--
20 array(4) {
21 ["verbose"]=>
22 bool(true)
23 ["logfile"]=>
24 NULL
25 ["help"]=>
26 NULL
27 ["version"]=>
28 NULL
29 }
30 string(7) "install"
31 array(2) {
32 ["force"]=>
33 bool(true)
34 ["help"]=>
35 NULL
36 }