xref: /PHP-7.2/ext/ftp/tests/006.phpt (revision 0103d1e3)
1--TEST--
2FTP with bogus parameters
3--SKIPIF--
4<?php
5require 'skipif.inc';
6?>
7--FILE--
8<?php
9$ftp=null;
10
11var_dump(ftp_connect(array()));
12var_dump(ftp_connect('127.0.0.1', 0, -3));
13var_dump(ftp_raw($ftp));
14var_dump(ftp_mkdir($ftp));
15var_dump(ftp_rmdir($ftp));
16var_dump(ftp_nlist($ftp));
17var_dump(ftp_rawlist($ftp));
18var_dump(ftp_fget($ftp));
19var_dump(ftp_nb_fget($ftp));
20var_dump(ftp_nb_get($ftp));
21var_dump(ftp_pasv($ftp));
22var_dump(ftp_nb_continue());
23var_dump(ftp_fput());
24var_dump(ftp_nb_fput($ftp));
25var_dump(ftp_put($ftp));
26var_dump(ftp_nb_put($ftp));
27var_dump(ftp_size($ftp));
28var_dump(ftp_mdtm($ftp));
29var_dump(ftp_rename($ftp));
30var_dump(ftp_site($ftp));
31var_dump(ftp_set_option($ftp));
32var_dump(ftp_get_option($ftp));
33var_dump(ftp_mlsd($ftp));
34
35?>
36--EXPECTF--
37Warning: ftp_connect() expects parameter 1 to be string, array given in %s006.php on line 4
38NULL
39
40Warning: ftp_connect(): Timeout has to be greater than 0 in %s006.php on line 5
41bool(false)
42
43Warning: ftp_raw() expects exactly 2 parameters, 1 given in %s006.php on line 6
44NULL
45
46Warning: ftp_mkdir() expects exactly 2 parameters, 1 given in %s006.php on line 7
47NULL
48
49Warning: ftp_rmdir() expects exactly 2 parameters, 1 given in %s006.php on line 8
50NULL
51
52Warning: ftp_nlist() expects exactly 2 parameters, 1 given in %s006.php on line 9
53NULL
54
55Warning: ftp_rawlist() expects at least 2 parameters, 1 given in %s006.php on line 10
56NULL
57
58Warning: ftp_fget() expects at least 4 parameters, 1 given in %s006.php on line 11
59NULL
60
61Warning: ftp_nb_fget() expects at least 4 parameters, 1 given in %s006.php on line 12
62NULL
63
64Warning: ftp_nb_get() expects at least 4 parameters, 1 given in %s006.php on line 13
65NULL
66
67Warning: ftp_pasv() expects exactly 2 parameters, 1 given in %s006.php on line 14
68NULL
69
70Warning: ftp_nb_continue() expects exactly 1 parameter, 0 given in %s006.php on line 15
71NULL
72
73Warning: ftp_fput() expects at least 4 parameters, 0 given in %s006.php on line 16
74NULL
75
76Warning: ftp_nb_fput() expects at least 4 parameters, 1 given in %s006.php on line 17
77NULL
78
79Warning: ftp_put() expects at least 4 parameters, 1 given in %s006.php on line 18
80NULL
81
82Warning: ftp_nb_put() expects at least 4 parameters, 1 given in %s006.php on line 19
83NULL
84
85Warning: ftp_size() expects exactly 2 parameters, 1 given in %s006.php on line 20
86NULL
87
88Warning: ftp_mdtm() expects exactly 2 parameters, 1 given in %s006.php on line 21
89NULL
90
91Warning: ftp_rename() expects exactly 3 parameters, 1 given in %s006.php on line 22
92NULL
93
94Warning: ftp_site() expects exactly 2 parameters, 1 given in %s006.php on line 23
95NULL
96
97Warning: ftp_set_option() expects exactly 3 parameters, 1 given in %s006.php on line 24
98NULL
99
100Warning: ftp_get_option() expects exactly 2 parameters, 1 given in %s006.php on line 25
101NULL
102
103Warning: ftp_mlsd() expects exactly 2 parameters, 1 given in %s006.php on line 26
104NULL
105