PATH:
opt
/
alt
/
tests
/
alt-php84-pecl-imap_1.0.3-1.el8
/
tests
--TEST-- imap_rfc822_parse_headers() function : basic functionality --CREDITS-- Olivier Doucet --EXTENSIONS-- imap --SKIPIF-- <?php require_once(__DIR__.'/setup/skipif.inc'); ?> --FILE-- <?php require_once(__DIR__.'/setup/imap_include.inc'); $stream_id = setup_test_mailbox('imaprfc822parseheadersbasic', 1); $z = imap_headerinfo($stream_id, 1); $fields = array ('toaddress','to','fromaddress','from', 'reply_toaddress','reply_to', 'senderaddress', 'sender', 'subject','Subject', 'MailDate','Size','udate'); echo "Check general fields\n"; foreach ($fields as $key) { var_dump(isset($z->$key)); } echo "Check type\n"; var_dump($z->toaddress); var_dump($z->fromaddress); var_dump($z->reply_toaddress); var_dump($z->senderaddress); var_dump($z->subject); var_dump($z->Subject); if ($z->Recent == 'R' || $z->Recent == 'N' || $z->Recent == ' ') { echo "Recent: OK"; } else { echo "Recent: error"; } echo "\n"; if ($z->Unseen == 'U' || $z->Unseen == ' ') { echo "Unseen: OK"; } else { echo "Unseen: error"; } echo "\n"; if ($z->Flagged == 'F' || $z->Flagged == ' ') { echo "Flagged: OK"; } else { echo "Flagged: error"; } echo "\n"; if ($z->Answered == 'A' || $z->Answered == ' ') { echo "Answered: OK"; } else { echo "Answered: error"; } echo "\n"; if ($z->Deleted == 'D' || $z->Deleted == ' ') { echo "Deleted: OK"; } else { echo "Deleted: error"; } echo "\n"; if ($z->Draft == 'X' || $z->Draft == ' ') { echo "Draft: OK"; } else { echo "Draft: error"; } echo "\n"; var_dump($z->Msgno); var_dump($z->Size); var_dump($z->udate); imap_close($stream_id); ?> --CLEAN-- <?php $mailbox_suffix = 'imaprfc822parseheadersbasic'; require_once(__DIR__ . '/setup/clean.inc'); ?> --EXPECTF-- Create a temporary mailbox and add 1 msgs New mailbox created Check general fields bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) Check type string(%d) "%s" string(%d) "%s" string(%d) "%s" string(%d) "%s" string(%d) "%s" string(%d) "%s" Recent: OK Unseen: OK Flagged: OK Answered: OK Deleted: OK Draft: OK string(%d) "%s" string(%d) "%d" int(%d)
[-] bug80223.phpt
[edit]
[-] imap_rfc822_parse_headers_basic.phpt
[edit]
[-] imap_constructor.phpt
[edit]
[-] imap_setflag_full_basic.phpt
[edit]
[-] bug80800.phpt
[edit]
[-] imap_mail_copy_basic.phpt
[edit]
[-] bug80710_1.phpt
[edit]
[-] imap_fetchheader_errors.phpt
[edit]
[-] imap_close_basic.phpt
[edit]
[-] imap_fetchbody_basic.phpt
[edit]
[-] bug80215.phpt
[edit]
[-] imap_lsub_basic.phpt
[edit]
[-] imap_append_basic.phpt
[edit]
[-] imap_fetch_overview_basic.phpt
[edit]
[-] imap_fetchheader_basic.phpt
[edit]
[-] bug80216.phpt
[edit]
[-] imap_headerinfo_basic.phpt
[edit]
[-] imap_sort_uid.phpt
[edit]
[-] bug80710_2.phpt
[edit]
[-] imap_savebody_basic.phpt
[edit]
[-] bug46918.phpt
[edit]
[-] bug80226.phpt
[edit]
[-] bug77153.phpt
[edit]
[-] bug31142_2.phpt
[edit]
[-] bug40854.phpt
[edit]
[-] imap_gc_error.phpt
[edit]
[-] imap_open_with_cl_expunge.phpt
[edit]
[-] imap_delete_uid.phpt
[edit]
[-] imap_fetchstructure_basic.phpt
[edit]
[-] imap_savebody_errors.phpt
[edit]
[-] bug80438.phpt
[edit]
[-] bug63126.phpt
[edit]
[-] imap_undelete_uid.phpt
[edit]
[-] bug53377.phpt
[edit]
[-] imap_fetchbody_uid.phpt
[edit]
[-] imap_fetchbody_variation6.phpt
[edit]
[-] imap_errors_basic.phpt
[edit]
[-] imap_fetch_overview_uid.phpt
[edit]
[-] bug45705_1.phpt
[edit]
[-] bug45705_2.phpt
[edit]
[-] bug75774.phpt
[edit]
[-] imap_clearflag_full_uid.phpt
[edit]
[-] bug35669.phpt
[edit]
[-] nil_constant.phpt
[edit]
[-] imap_undelete_basic.phpt
[edit]
[-] bug32589.phpt
[edit]
[-] imap_rfc822_write_address_basic.phpt
[edit]
[-] imap_getsubscribed_basic.phpt
[edit]
[-] imap_fetchmime_errors.phpt
[edit]
[-] gh9309.phpt
[edit]
[-] README.md
[edit]
[-] imap_body_basic.phpt
[edit]
[-] imap_base64_basic.phpt
[edit]
[-] bug80213.phpt
[edit]
[-] imap_reopen_with_cl_expunge.phpt
[edit]
[-] imap_open_error.phpt
[edit]
[+]
setup
[-] imap_fetchstructure_errors.phpt
[edit]
[-] imap_savebody_uid.phpt
[edit]
[-] imap_is_open.phpt
[edit]
[+]
..
[-] bug80242.phpt
[edit]
[-] imap_utf8_to_mutf7_basic.phpt
[edit]
[-] imap_fetchheader_variation5.phpt
[edit]
[-] imap_body_errors.phpt
[edit]
[-] imap_fetch_overview_variation6.phpt
[edit]
[-] imap_fetchbody_errors.phpt
[edit]
[-] imap_binary_basic.phpt
[edit]
[-] imap_mutf7_to_utf8.phpt
[edit]
[-] imap_utf8.phpt
[edit]
[-] bug44098.phpt
[edit]
[-] imap_clearflag_full_basic.phpt
[edit]
[-] bug31142_1.phpt
[edit]
[-] imap_final.phpt
[edit]
[-] imap_list_basic.phpt
[edit]
[-] bug64076.phpt
[edit]
[-] imap_createmailbox_basic.phpt
[edit]
[-] imap_fetchmime_uid.phpt
[edit]
[-] imap_timeout_basic.phpt
[edit]
[-] imap_bodystruct_basic.phpt
[edit]
[-] imap_body_uid.phpt
[edit]
[-] imap_fetchstructure_uid.phpt
[edit]
[-] imap_8bit_basic.phpt
[edit]
[-] imap_fetchheader_uid.phpt
[edit]
[-] imap_mail_move_basic.phpt
[edit]
[-] imap_fetch_overview_variation5.phpt
[edit]
[-] imap_search_basic.phpt
[edit]
[-] imap_close_variation4.phpt
[edit]
[-] bug77020.phpt
[edit]
[-] imap_renamemailbox_basic.phpt
[edit]
[-] imap_setflag_full_uid.phpt
[edit]
[-] bug80220.phpt
[edit]