Annotation of embedaddon/php/ext/imap/tests/imap_fetchstructure_basic.phpt, revision 1.1

1.1     ! misho       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();
        !            13: 
        !            14: echo  "Checking with incorrect parameter type\n";
        !            15: imap_fetchstructure('');
        !            16: imap_fetchstructure(false);
        !            17: 
        !            18: require_once(dirname(__FILE__).'/imap_include.inc');
        !            19: $stream_id = setup_test_mailbox('', 1);
        !            20: 
        !            21: imap_fetchstructure($stream_id);
        !            22: imap_fetchstructure($stream_id,0);
        !            23: 
        !            24: $z = imap_fetchstructure($stream_id,1);
        !            25: 
        !            26: 
        !            27: $fields = array('type','encoding','ifsubtype','subtype',
        !            28: 'ifdescription','lines','bytes','parameters');
        !            29: 
        !            30: foreach ($fields as $key) {
        !            31:        var_dump(isset($z->$key));
        !            32: }
        !            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));
        !            38: 
        !            39: imap_close($stream_id);
        !            40: ?>
        !            41: --CLEAN--
        !            42: <?php 
        !            43: require_once('clean.inc');
        !            44: ?>
        !            45: --EXPECTF--
        !            46: Checking with no parameters
        !            47: 
        !            48: Warning: imap_fetchstructure() expects at least 2 parameters, 0 given in %s on line %d
        !            49: Checking with incorrect parameter type
        !            50: 
        !            51: Warning: imap_fetchstructure() expects at least 2 parameters, 1 given in %s on line %d
        !            52: 
        !            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
        !            56: 
        !            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)

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>