Annotation of embedaddon/php/ext/ftp/tests/004.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: FTP with bogus parameters
! 3: --SKIPIF--
! 4: <?php
! 5: require 'skipif.inc';
! 6: ?>
! 7: --FILE--
! 8: <?php
! 9: require 'server.inc';
! 10:
! 11: $ftp = ftp_connect('127.0.0.1', $port);
! 12: if (!$ftp) die("Couldn't connect to the server");
! 13:
! 14: var_dump(ftp_login($ftp, 'user', 'pass'));
! 15:
! 16: var_dump(ftp_systype($ftp));
! 17:
! 18: /* some bogus usage */
! 19: var_dump(ftp_alloc($ftp, array()));
! 20: var_dump(ftp_cdup($ftp, 0));
! 21: var_dump(ftp_chdir($ftp, array()));
! 22: var_dump(ftp_chmod($ftp, 0666));
! 23: var_dump(ftp_get($ftp, 1234,12));
! 24: var_dump(ftp_close());
! 25: var_dump(ftp_connect('sfjkfjaksfjkasjf'));
! 26: var_dump(ftp_delete($ftp, array()));
! 27: var_dump(ftp_exec($ftp, array()));
! 28:
! 29: var_dump(ftp_systype($ftp, 0));
! 30: var_dump(ftp_pwd($ftp, array()));
! 31:
! 32: var_dump(ftp_login($ftp));
! 33: var_dump(ftp_login($ftp, 'user', 'bogus'));
! 34:
! 35: var_dump(ftp_quit($ftp));
! 36: ?>
! 37: --EXPECTF--
! 38: bool(true)
! 39: string(4) "UNIX"
! 40:
! 41: Warning: ftp_alloc() expects parameter 2 to be long, array given in %s004.php on line 12
! 42: bool(false)
! 43:
! 44: Warning: ftp_cdup() expects exactly 1 parameter, 2 given in %s004.php on line 13
! 45: NULL
! 46:
! 47: Warning: ftp_chdir() expects parameter 2 to be string, array given in %s004.php on line 14
! 48: NULL
! 49:
! 50: Warning: ftp_chmod() expects exactly 3 parameters, 2 given in %s on line %d
! 51: bool(false)
! 52:
! 53: Warning: ftp_get() expects at least 4 parameters, 3 given in %s on line %d
! 54: NULL
! 55:
! 56: Warning: ftp_close() expects exactly 1 parameter, 0 given in %s004.php on line 17
! 57: NULL
! 58:
! 59: Warning: ftp_connect(): php_network_getaddresses: getaddrinfo failed: %s in %s004.php on line 18
! 60: bool(false)
! 61:
! 62: Warning: ftp_delete() expects parameter 2 to be string, array given in %s004.php on line 19
! 63: NULL
! 64:
! 65: Warning: ftp_exec() expects parameter 2 to be string, array given in %s004.php on line 20
! 66: NULL
! 67:
! 68: Warning: ftp_systype() expects exactly 1 parameter, 2 given in %s004.php on line 22
! 69: NULL
! 70:
! 71: Warning: ftp_pwd() expects exactly 1 parameter, 2 given in %s004.php on line 23
! 72: NULL
! 73:
! 74: Warning: ftp_login() expects exactly 3 parameters, 1 given in %s004.php on line 25
! 75: NULL
! 76:
! 77: Warning: ftp_login(): Not logged in. in %s004.php on line 26
! 78: bool(false)
! 79: bool(true)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>