php-src/ext/imap/tests
Stanislav Malyshev a4d9ccbcd6
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #80710: imap_mail_compose() header injection
2021-04-26 21:49:38 -07:00
..
setup Fix Bug #80800 imap_open() fails when the flags parameter includes CL_EXPUNGE 2021-02-27 13:12:22 +00:00
bug31142_1.phpt
bug31142_2.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
bug32589.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
bug35669.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
bug40854.phpt
bug44098.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
bug45705_1.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
bug45705_2.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
bug46918.phpt
bug53377.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
bug63126.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
bug64076.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
bug75774.phpt Set-up IMAP in Azure 2020-09-18 23:02:01 +02:00
bug77020.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
bug77153.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
bug80213.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
bug80215.phpt Fix #80215: imap_mail_compose() may modify by-val parameters 2020-10-10 23:25:06 +02:00
bug80216.phpt Fix #80216: imap_mail_compose() does not validate types/encodings 2020-10-12 16:27:49 +02:00
bug80220.phpt Properly fix #80220 2020-10-20 13:32:53 +02:00
bug80223.phpt Throw Value/TypeError for invalid $bodies in imap_mail_compose() 2020-10-23 20:47:35 +01:00
bug80226.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
bug80242.phpt Fix #80242: imap_mail_compose() segfaults for multipart with rfc822 2020-10-20 18:58:45 +02:00
bug80438.phpt Add tests for passing a UID instead of a message number 2020-12-03 16:38:22 +00:00
bug80710_1.phpt Fix #80710: imap_mail_compose() header injection 2021-04-26 21:43:03 -07:00
bug80710_2.phpt Fix #80710: imap_mail_compose() header injection 2021-04-26 21:43:03 -07:00
bug80800.phpt Fix Bug #80800 imap_open() fails when the flags parameter includes CL_EXPUNGE 2021-02-27 13:12:22 +00:00
imap_8bit_basic.phpt Remove unnecessary PHPDoc-alike blocks from tests 2020-06-24 13:13:44 +02:00
imap_append_basic.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
imap_base64_basic.phpt Remove unnecessary PHPDoc-alike blocks from tests 2020-06-24 13:13:44 +02:00
imap_binary_basic.phpt Replace EXPECTF when possible 2020-06-29 21:31:44 +02:00
imap_body_basic.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
imap_body_errors.phpt Standardize behaviour for int message number between functions 2020-12-03 17:43:08 +00:00
imap_body_uid.phpt Add tests for passing a UID instead of a message number 2020-12-03 16:38:22 +00:00
imap_bodystruct_basic.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
imap_clearflag_full_basic.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
imap_clearflag_full_uid.phpt Add tests for passing a UID instead of a message number 2020-12-03 16:38:22 +00:00
imap_close_basic.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
imap_close_variation4.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
imap_createmailbox_basic.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
imap_delete_uid.phpt Add tests for passing a UID instead of a message number 2020-12-03 16:38:22 +00:00
imap_errors_basic.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
imap_fetch_overview_basic.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
imap_fetch_overview_uid.phpt Add tests for passing a UID instead of a message number 2020-12-03 16:38:22 +00:00
imap_fetch_overview_variation3.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
imap_fetch_overview_variation5.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
imap_fetch_overview_variation6.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
imap_fetchbody_basic.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
imap_fetchbody_errors.phpt Standardize behaviour for int message number between functions 2020-12-03 17:43:08 +00:00
imap_fetchbody_uid.phpt Add tests for passing a UID instead of a message number 2020-12-03 16:38:22 +00:00
imap_fetchbody_variation4.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
imap_fetchbody_variation6.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
imap_fetchheader_basic.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
imap_fetchheader_errors.phpt Standardize behaviour for int message number between functions 2020-12-03 17:43:08 +00:00
imap_fetchheader_uid.phpt Add tests for passing a UID instead of a message number 2020-12-03 16:38:22 +00:00
imap_fetchheader_variation3.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
imap_fetchheader_variation5.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
imap_fetchmime_errors.phpt Standardize behaviour for int message number between functions 2020-12-03 17:43:08 +00:00
imap_fetchmime_uid.phpt Add tests for passing a UID instead of a message number 2020-12-03 16:38:22 +00:00
imap_fetchstructure_basic.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
imap_fetchstructure_errors.phpt Standardize behaviour for int message number between functions 2020-12-03 17:43:08 +00:00
imap_fetchstructure_uid.phpt Add tests for passing a UID instead of a message number 2020-12-03 16:38:22 +00:00
imap_gc_error.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
imap_getsubscribed_basic.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
imap_headerinfo_basic.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
imap_list_basic.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
imap_lsub_basic.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
imap_mail_copy_basic.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
imap_mail_move_basic.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
imap_mutf7_to_utf8.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
imap_open_error.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
imap_open_with_cl_expunge.phpt Fix Bug #80800 imap_open() fails when the flags parameter includes CL_EXPUNGE 2021-02-27 13:12:22 +00:00
imap_renamemailbox_basic.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
imap_reopen_with_cl_expunge.phpt Fix Bug #80800 imap_open() fails when the flags parameter includes CL_EXPUNGE 2021-02-27 13:12:22 +00:00
imap_rfc822_parse_headers_basic.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
imap_rfc822_write_address_basic.phpt Fix #80239: imap_rfc822_write_address() leaks memory 2020-10-15 12:54:53 +02:00
imap_savebody_basic.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
imap_savebody_errors.phpt Standardize behaviour for int message number between functions 2020-12-03 17:43:08 +00:00
imap_savebody_uid.phpt Add tests for passing a UID instead of a message number 2020-12-03 16:38:22 +00:00
imap_search_basic.phpt Add tests for passing a UID instead of a message number 2020-12-03 16:38:22 +00:00
imap_setflag_full_basic.phpt Add tests for passing a UID instead of a message number 2020-12-03 16:38:22 +00:00
imap_setflag_full_uid.phpt Add tests for passing a UID instead of a message number 2020-12-03 16:38:22 +00:00
imap_sort_uid.phpt Add tests for passing a UID instead of a message number 2020-12-03 16:38:22 +00:00
imap_timeout_basic.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
imap_undelete_basic.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
imap_undelete_uid.phpt Add tests for passing a UID instead of a message number 2020-12-03 16:38:22 +00:00
imap_utf8.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
imap_utf8_to_mutf7_basic.phpt Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00
README.md Backport IMAP test modernization to PHP-8.0 branch 2020-12-01 16:38:08 +00:00

The imap extension tests

Many of the tests in this directory require a mail server to be running, if there is no mail server the test will skip and warn, see skipif.inc for details.

To make the tests run parameters in the skipif.inc and imap_include.inc files will need to be changed to match the local mailserver configuration.

The tests have been checked using dovecot (on Linux 32 and 64 bit systems) and hMailServer on Windows. The tests are intended to be mailserver agnostic.

Set-up tests on Ubuntu (checked on Ubuntu 18.04 (Bionic))

The necessary packages can be installed using the following command; apt-get install libc-client-dev libkrb5-dev dovecot-core dovecot-pop3d dovecot-imapd sendmail

The build of PHP will need to be compiled with the following flags:

--with-imap --with-kerberos --with-imap-ssl

Then run the set-up script ext/imap/tests/setup/setup.sh which will add the vmail group and user which is used by Dovecot for the mailbox. It will also copy the ext/imap/tests/setup/dovecot.conf and ext/imap/tests/setup/dovecotpass to the correct location for Dovecot and restarts it for the new configuration to be enabled.