Busybox: Upgrade to 1.21.1 (stable). lsof active.
[tomato.git] / release / src / router / php / ext / imap / tests / imap_fetchstructure_basic.phpt
blob7ad4fc56226d124b028f58c540c77560797849d2
1 --TEST--
2 imap_fetchstructure() function : basic functionality 
3 --CREDITS--
4 Olivier Doucet
5 --SKIPIF--
6 <?php
7 require_once(dirname(__FILE__).'/skipif.inc');
8 ?>
9 --FILE--
10 <?php
11 echo "Checking with no parameters\n";
12 imap_fetchstructure();
14 echo  "Checking with incorrect parameter type\n";
15 imap_fetchstructure('');
16 imap_fetchstructure(false);
18 require_once(dirname(__FILE__).'/imap_include.inc');
19 $stream_id = setup_test_mailbox('', 1);
21 imap_fetchstructure($stream_id);
22 imap_fetchstructure($stream_id,0);
24 $z = imap_fetchstructure($stream_id,1);
27 $fields = array('type','encoding','ifsubtype','subtype',
28 'ifdescription','lines','bytes','parameters');
30 foreach ($fields as $key) {
31         var_dump(isset($z->$key));
33 var_dump($z->type);
34 var_dump($z->encoding);
35 var_dump($z->bytes);
36 var_dump($z->lines);
37 var_dump(is_object($z->parameters));
39 imap_close($stream_id);
41 --CLEAN--
42 <?php 
43 require_once('clean.inc');
45 --EXPECTF--
46 Checking with no parameters
48 Warning: imap_fetchstructure() expects at least 2 parameters, 0 given in %s on line %d
49 Checking with incorrect parameter type
51 Warning: imap_fetchstructure() expects at least 2 parameters, 1 given in %s on line %d
53 Warning: imap_fetchstructure() expects at least 2 parameters, 1 given in %s on line %d
54 Create a temporary mailbox and add 1 msgs
55 .. mailbox '{%s}%s' created
57 Warning: imap_fetchstructure() expects at least 2 parameters, 1 given in %s on line %d
58 bool(true)
59 bool(true)
60 bool(true)
61 bool(true)
62 bool(true)
63 bool(true)
64 bool(true)
65 bool(true)
66 int(%d)
67 int(%d)
68 int(%d)
69 int(%d)
70 bool(true)