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

1.1     ! misho       1: --TEST--
        !             2: Test imap_mail_copy() 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: /* Prototype  : bool imap_mail_copy  ( resource $imap_stream  , string $msglist  , string $mailbox  [, int $options = 0  ] )
        !            12:  * Description: Copies mail messages specified by msglist  to specified mailbox. 
        !            13:  * Source code: ext/imap/php_imap.c
        !            14:  */
        !            15: 
        !            16: echo "*** Testing imap_mail_copy() : basic functionality ***\n";
        !            17: 
        !            18: require_once(dirname(__FILE__).'/imap_include.inc');
        !            19: 
        !            20: 
        !            21: echo "Create a new mailbox for test\n";
        !            22: $imap_stream = setup_test_mailbox("", 1);
        !            23: if (!is_resource($imap_stream)) {
        !            24:        exit("TEST FAILED: Unable to create test mailbox\n");
        !            25: }
        !            26: 
        !            27: $check = imap_check($imap_stream);
        !            28: echo "Msg Count in new mailbox: ". $check->Nmsgs . "\n";    
        !            29: 
        !            30: var_dump(imap_mail_copy($imap_stream, '1', 'INBOX.'.$mailbox_prefix));
        !            31: 
        !            32: imap_close($imap_stream);
        !            33: ?>
        !            34: ===Done===
        !            35: --CLEAN--
        !            36: <?php 
        !            37: require_once('clean.inc');
        !            38: ?>
        !            39: --EXPECTF--
        !            40: *** Testing imap_mail_copy() : basic functionality ***
        !            41: Create a new mailbox for test
        !            42: Create a temporary mailbox and add 1 msgs
        !            43: .. mailbox '%s' created
        !            44: Msg Count in new mailbox: 1
        !            45: bool(true)
        !            46: ===Done===

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