xref: /PHP-5.4/ext/ftp/tests/005.phpt (revision d64b1754)
1--TEST--
2FTP with bogus server responses
3--SKIPIF--
4<?php
5require 'skipif.inc';
6?>
7--FILE--
8<?php
9$bogus = 1;
10require 'server.inc';
11
12$ftp = ftp_connect('127.0.0.1', $port);
13if (!$ftp) die("Couldn't connect to the server");
14
15var_dump(ftp_login($ftp, 'anonymous', 'mail@example.com'));
16
17var_dump(ftp_alloc($ftp, 400));
18var_dump(ftp_cdup($ftp));
19var_dump(ftp_chdir($ftp, '~'));
20var_dump(ftp_chmod($ftp, 0666, 'x'));
21var_dump(ftp_delete($ftp, 'x'));
22var_dump(ftp_exec($ftp, 'x'));
23var_dump(ftp_fget($ftp, STDOUT, 'x', 0));
24var_dump(ftp_fput($ftp, 'x', fopen(__FILE__, 'r'), 0));
25var_dump(ftp_get($ftp, 'x', 'y', 0));
26var_dump(ftp_mdtm($ftp, 'x'));
27var_dump(ftp_mkdir($ftp, 'x'));
28var_dump(ftp_nb_continue($ftp));
29var_dump(ftp_nb_fget($ftp, STDOUT, 'x', 0));
30var_dump(ftp_nb_fput($ftp, 'x', fopen(__FILE__, 'r'), 0));
31var_dump(ftp_systype($ftp));
32var_dump(ftp_pwd($ftp));
33var_dump(ftp_size($ftp, ''));
34var_dump(ftp_rmdir($ftp, ''));
35
36?>
37--EXPECTF--
38bool(true)
39bool(false)
40
41Warning: ftp_cdup(): Command not implemented (1). in %s005.php on line 11
42bool(false)
43
44Warning: ftp_chdir(): Command not implemented (2). in %s005.php on line 12
45bool(false)
46
47Warning: ftp_chmod(): Command not implemented (3). in %s005.php on line 13
48bool(false)
49
50Warning: ftp_delete(): Command not implemented (4). in %s005.php on line 14
51bool(false)
52
53Warning: ftp_exec(): Command not implemented (5). in %s005.php on line 15
54bool(false)
55
56Warning: ftp_fget(): Mode must be FTP_ASCII or FTP_BINARY in %s005.php on line 16
57bool(false)
58
59Warning: ftp_fput(): Mode must be FTP_ASCII or FTP_BINARY in %s005.php on line 17
60bool(false)
61
62Warning: ftp_get(): Mode must be FTP_ASCII or FTP_BINARY in %s005.php on line 18
63bool(false)
64int(-1)
65
66Warning: ftp_mkdir(): Command not implemented (7). in %s005.php on line 20
67bool(false)
68
69Warning: ftp_nb_continue(): no nbronous transfer to continue. in %s005.php on line 21
70int(0)
71
72Warning: ftp_nb_fget(): Mode must be FTP_ASCII or FTP_BINARY in %s005.php on line 22
73bool(false)
74
75Warning: ftp_nb_fput(): Mode must be FTP_ASCII or FTP_BINARY in %s005.php on line 23
76bool(false)
77
78Warning: ftp_systype(): Command not implemented (8). in %s005.php on line 24
79bool(false)
80
81Warning: ftp_pwd(): Command not implemented (9). in %s005.php on line 25
82bool(false)
83int(-1)
84
85Warning: ftp_rmdir(): Command not implemented (11). in %s005.php on line 27
86bool(false)
87