comparison vendor/pear/console_commandline/tests/console_commandline_parse_19.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 help 1).
3 --STDIN--
4 some_package
5 --SKIPIF--
6 <?php if(php_sapi_name()!='cli') echo 'skip'; ?>
7 --ARGS--
8 -v instbis -f -
9 --FILE--
10 <?php
11
12 require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'tests.inc.php';
13
14 $parser = buildParser2();
15 try {
16 $result = $parser->parse();
17 print_r($result);
18 } catch (Exception $exc) {
19 echo $exc->getMessage();
20 }
21
22 ?>
23 --EXPECT--
24 Console_CommandLine_Result Object
25 (
26 [options] => Array
27 (
28 [verbose] => 1
29 [logfile] =>
30 [help] =>
31 [version] =>
32 )
33
34 [args] => Array
35 (
36 )
37
38 [command_name] => install
39 [command] => Console_CommandLine_Result Object
40 (
41 [options] => Array
42 (
43 [force] => 1
44 [help] =>
45 )
46
47 [args] => Array
48 (
49 [package] => some_package
50
51 )
52
53 [command_name] =>
54 [command] =>
55 )
56
57 )