Mercurial > hg > rc1
comparison vendor/pear/console_commandline/tests/console_commandline_webrequest_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::parse() with a web request 3 | |
3 --POST-- | |
4 true=1&false=1&string=foo&int=3&float=4.0&callback=somestring&-a[]=foo&-a[]=bar&-a[]=baz&simple=foo&multiple=bar | |
5 --FILE-- | |
6 <?php | |
7 | |
8 require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'tests.inc.php'; | |
9 | |
10 $parser = buildParser1(); | |
11 $result = $parser->parse(); | |
12 var_dump($result->options); | |
13 var_dump($result->args); | |
14 | |
15 ?> | |
16 --EXPECT-- | |
17 array(11) { | |
18 ["true"]=> | |
19 bool(true) | |
20 ["false"]=> | |
21 bool(false) | |
22 ["int"]=> | |
23 int(3) | |
24 ["float"]=> | |
25 float(4) | |
26 ["string"]=> | |
27 string(3) "foo" | |
28 ["counter"]=> | |
29 NULL | |
30 ["callback"]=> | |
31 string(20) "foo__fbzrfgevat__bar" | |
32 ["array"]=> | |
33 array(3) { | |
34 [0]=> | |
35 string(3) "foo" | |
36 [1]=> | |
37 string(3) "bar" | |
38 [2]=> | |
39 string(3) "baz" | |
40 } | |
41 ["password"]=> | |
42 NULL | |
43 ["help"]=> | |
44 NULL | |
45 ["version"]=> | |
46 NULL | |
47 } | |
48 array(2) { | |
49 ["simple"]=> | |
50 string(3) "foo" | |
51 ["multiple"]=> | |
52 array(1) { | |
53 [0]=> | |
54 string(3) "bar" | |
55 } | |
56 } |