File tree Expand file tree Collapse file tree 1 file changed +79
-0
lines changed Expand file tree Collapse file tree 1 file changed +79
-0
lines changed Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Test parse_url() for bug #63162
3
+ --DESCRIPTION--
4
+ This test covers tests the inputs:
5
+ [0]=> http://user:pass@host
6
+ [1]=> //user:pass@host
7
+ [2]=> //user@host
8
+ --FILE--
9
+ <?php
10
+ var_dump (parse_url ('http://user:pass@host ' ));
11
+ var_dump (parse_url ('//user:pass@host ' ));
12
+ var_dump (parse_url ('//user@host ' ));
13
+ ?>
14
+ --EXPECTF--
15
+ array(4) {
16
+ ["scheme"]=>
17
+ string(4) "http"
18
+ ["host"]=>
19
+ string(4) "host"
20
+ ["user"]=>
21
+ string(4) "user"
22
+ ["pass"]=>
23
+ string(4) "pass"
24
+ }
25
+
26
+ array(3) {
27
+ ["host"]=>
28
+ string(4) "host"
29
+ ["user"]=>
30
+ string(4) "user"
31
+ ["pass"]=>
32
+ string(4) "pass"
33
+ }
34
+
35
+ array(2) {
36
+ ["host"]=>
37
+ string(4) "host"
38
+ ["user"]=>
39
+ string(4) "user"
40
+ }--TEST--
41
+ Test parse_url() for bug #63162
42
+ --DESCRIPTION--
43
+ This test covers tests the inputs:
44
+ [0]=> http://user:pass@host
45
+ [1]=> //user:pass@host
46
+ [2]=> //user@host
47
+ --FILE--
48
+ <?php
49
+ var_dump (parse_url ('http://user:pass@host ' ));
50
+ var_dump (parse_url ('//user:pass@host ' ));
51
+ var_dump (parse_url ('//user@host ' ));
52
+ ?>
53
+ --EXPECT--
54
+ array(4) {
55
+ ["scheme"]=>
56
+ string(4) "http"
57
+ ["host"]=>
58
+ string(4) "host"
59
+ ["user"]=>
60
+ string(4) "user"
61
+ ["pass"]=>
62
+ string(4) "pass"
63
+ }
64
+
65
+ array(3) {
66
+ ["host"]=>
67
+ string(4) "host"
68
+ ["user"]=>
69
+ string(4) "user"
70
+ ["pass"]=>
71
+ string(4) "pass"
72
+ }
73
+
74
+ array(2) {
75
+ ["host"]=>
76
+ string(4) "host"
77
+ ["user"]=>
78
+ string(4) "user"
79
+ }
You can’t perform that action at this time.
0 commit comments