diff options
| author | Jens de Nies <j.de.nies@protonmail.com> | 2020-05-13 20:15:39 +0200 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-05-14 09:37:22 +0200 |
| commit | a4cc9d83a130cd99c5074ce3a38e519757c15384 (patch) | |
| tree | 9b10127596753112dd5ad4636703b08c471f1d4a | |
| parent | 69d46c3433869728c67589c8f5a2f5738a6cddb3 (diff) | |
| download | php-git-a4cc9d83a130cd99c5074ce3a38e519757c15384.tar.gz | |
Removed pure zpp tests in the imap extension
Closes GH-5569.
| -rw-r--r-- | ext/imap/tests/imap_alerts_error.phpt | 29 | ||||
| -rw-r--r-- | ext/imap/tests/imap_close_error.phpt | 43 | ||||
| -rw-r--r-- | ext/imap/tests/imap_expunge_error.phpt | 27 | ||||
| -rw-r--r-- | ext/imap/tests/imap_fetch_overview_error.phpt | 52 | ||||
| -rw-r--r-- | ext/imap/tests/imap_fetchbody_error.phpt | 55 | ||||
| -rw-r--r-- | ext/imap/tests/imap_fetchheader_error.phpt | 47 | ||||
| -rw-r--r-- | ext/imap/tests/imap_headerinfo_error.phpt | 36 | ||||
| -rw-r--r-- | ext/imap/tests/imap_headers.phpt | 27 | ||||
| -rw-r--r-- | ext/imap/tests/imap_mail_copy.phpt | 52 | ||||
| -rw-r--r-- | ext/imap/tests/imap_mail_move.phpt | 52 | ||||
| -rw-r--r-- | ext/imap/tests/imap_num_msg_error.phpt | 27 | ||||
| -rw-r--r-- | ext/imap/tests/imap_num_recent_error.phpt | 27 | ||||
| -rw-r--r-- | ext/imap/tests/imap_ping_error.phpt | 27 | ||||
| -rw-r--r-- | ext/imap/tests/imap_undelete_error.phpt | 36 |
14 files changed, 0 insertions, 537 deletions
diff --git a/ext/imap/tests/imap_alerts_error.phpt b/ext/imap/tests/imap_alerts_error.phpt deleted file mode 100644 index 620d6d1e80..0000000000 --- a/ext/imap/tests/imap_alerts_error.phpt +++ /dev/null @@ -1,29 +0,0 @@ ---TEST-- -Test imap_alerts() function : error conditions ---SKIPIF-- -<?php -require_once(__DIR__.'/skipif.inc'); -?> ---FILE-- -<?php -/* Prototype : array imap_alerts(void) - * Description: Returns an array of all IMAP alerts that have been generated since the last page load or since the last imap_alerts() call, whichever came last. The alert stack is cleared after imap_alerts() is called. - * Source code: ext/imap/php_imap.c - * Alias to functions: - */ - -echo "*** Testing imap_alerts() : error conditions ***\n"; - -// One argument -echo "\n-- Testing imap_alerts() function with one argument --\n"; -$extra_arg = 10; -var_dump( imap_alerts($extra_arg) ); - -?> ---EXPECTF-- -*** Testing imap_alerts() : error conditions *** - --- Testing imap_alerts() function with one argument -- - -Warning: imap_alerts() expects exactly 0 parameters, 1 given in %s on line %d -NULL diff --git a/ext/imap/tests/imap_close_error.phpt b/ext/imap/tests/imap_close_error.phpt deleted file mode 100644 index ae370c7ef0..0000000000 --- a/ext/imap/tests/imap_close_error.phpt +++ /dev/null @@ -1,43 +0,0 @@ ---TEST-- -Test imap_close() function : error conditions - incorrect number of args ---SKIPIF-- -<?php -require_once (__DIR__.'/skipif.inc'); -?> ---FILE-- -<?php -/* Prototype : bool imap_close(resource $stream_id [, int $options]) - * Description: Close an IMAP stream - * Source code: ext/imap/php_imap.c - */ - -/* - * Pass an incorrect number of arguments to imap_close() to test behaviour - */ - -echo "*** Testing imap_close() : error conditions ***\n"; -require_once(__DIR__.'/imap_include.inc'); - -// Zero arguments -echo "\n-- Testing imap_close() function with Zero arguments --\n"; -var_dump( imap_close() ); - -//Test imap_close with one more than the expected number of arguments -echo "\n-- Testing imap_close() function with more than expected no. of arguments --\n"; -$stream_id = imap_open($server, $username, $password); -$options = CL_EXPUNGE; -$extra_arg = 10; -var_dump( imap_close($stream_id, $options, $extra_arg) ); -?> ---EXPECTF-- -*** Testing imap_close() : error conditions *** - --- Testing imap_close() function with Zero arguments -- - -Warning: imap_close() expects at least 1 parameter, 0 given in %s on line %d -NULL - --- Testing imap_close() function with more than expected no. of arguments -- - -Warning: imap_close() expects at most 2 parameters, 3 given in %s on line %d -NULL diff --git a/ext/imap/tests/imap_expunge_error.phpt b/ext/imap/tests/imap_expunge_error.phpt deleted file mode 100644 index b27038093c..0000000000 --- a/ext/imap/tests/imap_expunge_error.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -imap_num_recent() incorrect parameter count ---CREDITS-- -Paul Sohier -#phptestfest utrecht ---SKIPIF-- -<?php -require_once(__DIR__.'/skipif.inc'); -?> ---FILE-- -<?php -echo "Checking with no parameters\n"; -imap_num_recent(); - -echo "Checking with incorrect parameter type\n"; -imap_num_recent(''); -imap_num_recent(false); -?> ---EXPECTF-- -Checking with no parameters - -Warning: imap_num_recent() expects exactly 1 parameter, 0 given in %s on line %d -Checking with incorrect parameter type - -Warning: imap_num_recent(): Argument #1 must be of type resource, string given in %s on line %d - -Warning: imap_num_recent(): Argument #1 must be of type resource, bool given in %s on line %d diff --git a/ext/imap/tests/imap_fetch_overview_error.phpt b/ext/imap/tests/imap_fetch_overview_error.phpt deleted file mode 100644 index 3bba1a2426..0000000000 --- a/ext/imap/tests/imap_fetch_overview_error.phpt +++ /dev/null @@ -1,52 +0,0 @@ ---TEST-- -Test imap_fetch_overview() function : error conditions - incorrect number of args ---SKIPIF-- -<?php -require_once(__DIR__.'/skipif.inc'); -?> ---FILE-- -<?php -/* Prototype : array imap_fetch_overview(resource $stream_id, int $msg_no [, int $options]) - * Description: Read an overview of the information in the headers - * of the given message sequence - * Source code: ext/imap/php_imap.c - */ - -/* - * Pass an incorrect number of arguments to imap_fetch_overview() to test behaviour - */ - -echo "*** Testing imap_fetch_overview() : error conditions ***\n"; - -require_once(__DIR__.'/imap_include.inc'); - -//Test imap_fetch_overview with one more than the expected number of arguments -echo "\n-- Testing imap_fetch_overview() function with more than expected no. of arguments --\n"; -$stream_id = setup_test_mailbox('', 2, $mailbox, 'notSimple'); // set up temp mailbox with 2 msgs -$msg_no = 1; -$options = FT_UID; -$extra_arg = 10; -var_dump( imap_fetch_overview($stream_id, $msg_no, $options, $extra_arg) ); - -// Testing imap_fetch_overview with one less than the expected number of arguments -echo "\n-- Testing imap_fetch_overview() function with less than expected no. of arguments --\n"; -var_dump( imap_fetch_overview($stream_id) ); -?> ---CLEAN-- -<?php -require_once(__DIR__.'/clean.inc'); -?> ---EXPECTF-- -*** Testing imap_fetch_overview() : error conditions *** - --- Testing imap_fetch_overview() function with more than expected no. of arguments -- -Create a temporary mailbox and add 2 msgs -.. mailbox '{%s}%s' created - -Warning: imap_fetch_overview() expects at most 3 parameters, 4 given in %s on line %d -NULL - --- Testing imap_fetch_overview() function with less than expected no. of arguments -- - -Warning: imap_fetch_overview() expects at least 2 parameters, 1 given in %s on line %d -NULL diff --git a/ext/imap/tests/imap_fetchbody_error.phpt b/ext/imap/tests/imap_fetchbody_error.phpt deleted file mode 100644 index 89b54bf739..0000000000 --- a/ext/imap/tests/imap_fetchbody_error.phpt +++ /dev/null @@ -1,55 +0,0 @@ ---TEST-- -Test imap_fetchbody() function : error conditions - incorrect number of args ---SKIPIF-- -<?php -require_once(__DIR__.'/skipif.inc'); -?> ---FILE-- -<?php -/* Prototype :string imap_fetchbody(resource $stream_id, int $msg_no, string $section - * [, int $options]) - * Description: Get a specific body section - * Source code: ext/imap/php_imap.c - */ - -/* - * Pass an incorrect number of arguments to imap_fetchbody() to test behaviour - */ - -echo "*** Testing imap_fetchbody() : error conditions ***\n"; -require_once(__DIR__.'/imap_include.inc'); - -//Test imap_fetchbody with one more than the expected number of arguments -echo "\n-- Testing imap_fetchbody() function with more than expected no. of arguments --\n"; - -$stream_id = setup_test_mailbox('', 1); // set up temp mailbox with 1 simple msg -$msg_no = 1; -$section = '1'; -$options = FT_PEEK; -$extra_arg = 10; - -var_dump( imap_fetchbody($stream_id, $msg_no, $section, $options, $extra_arg) ); - -// Testing imap_fetchbody with one less than the expected number of arguments -echo "\n-- Testing imap_fetchbody() function with less than expected no. of arguments --\n"; - -var_dump( imap_fetchbody($stream_id, $msg_no) ); -?> ---CLEAN-- -<?php -require_once(__DIR__.'/clean.inc'); -?> ---EXPECTF-- -*** Testing imap_fetchbody() : error conditions *** - --- Testing imap_fetchbody() function with more than expected no. of arguments -- -Create a temporary mailbox and add 1 msgs -.. mailbox '{%s}%s' created - -Warning: imap_fetchbody() expects at most 4 parameters, 5 given in %s on line %d -NULL - --- Testing imap_fetchbody() function with less than expected no. of arguments -- - -Warning: imap_fetchbody() expects at least 3 parameters, 2 given in %s on line %d -NULL diff --git a/ext/imap/tests/imap_fetchheader_error.phpt b/ext/imap/tests/imap_fetchheader_error.phpt deleted file mode 100644 index b1d9921831..0000000000 --- a/ext/imap/tests/imap_fetchheader_error.phpt +++ /dev/null @@ -1,47 +0,0 @@ ---TEST-- -Test imap_fetchheader() function : error conditions - incorrect number of args ---SKIPIF-- -<?php -require_once(__DIR__.'/skipif.inc'); -?> ---FILE-- -<?php -/* Prototype : string imap_fetchheader(resource $stream_id, int $msg_no [, int $options]) - * Description: Get the full unfiltered header for a message - * Source code: ext/imap/php_imap.c - */ - -/* - * Pass an incorrect number of arguments to imap_fetchheader() to test behaviour - */ - -echo "*** Testing imap_fetchheader() : error conditions ***\n"; -require_once(__DIR__.'/imap_include.inc'); - -//Test imap_fetchheader with one more than the expected number of arguments -echo "\n-- Testing imap_fetchheader() function with more than expected no. of arguments --\n"; - -$stream_id = imap_open($server, $username, $password); -$msg_no = 10; -$options = 10; -$extra_arg = 10; -var_dump( imap_fetchheader($stream_id, $msg_no, $options, $extra_arg) ); - -// Testing imap_fetchheader with one less than the expected number of arguments -echo "\n-- Testing imap_fetchheader() function with less than expected no. of arguments --\n"; -var_dump( imap_fetchheader($stream_id) ); - -imap_close($stream_id); -?> ---EXPECTF-- -*** Testing imap_fetchheader() : error conditions *** - --- Testing imap_fetchheader() function with more than expected no. of arguments -- - -Warning: imap_fetchheader() expects at most 3 parameters, 4 given in %s on line %d -NULL - --- Testing imap_fetchheader() function with less than expected no. of arguments -- - -Warning: imap_fetchheader() expects at least 2 parameters, 1 given in %s on line %d -NULL diff --git a/ext/imap/tests/imap_headerinfo_error.phpt b/ext/imap/tests/imap_headerinfo_error.phpt deleted file mode 100644 index 3f3c593d06..0000000000 --- a/ext/imap/tests/imap_headerinfo_error.phpt +++ /dev/null @@ -1,36 +0,0 @@ ---TEST-- -imap_headerinfo() incorrect parameter count ---CREDITS-- -Olivier Doucet ---SKIPIF-- -<?php -require_once(__DIR__.'/skipif.inc'); -?> ---FILE-- -<?php -echo "Checking with no parameters\n"; -imap_headerinfo(); - -echo "Checking with incorrect parameter type\n"; -imap_headerinfo(''); -imap_headerinfo(false); - -require_once(__DIR__.'/imap_include.inc'); -$stream_id = imap_open($default_mailbox, $username, $password) or - die("Cannot connect to mailbox $default_mailbox: " . imap_last_error()); - -imap_headerinfo($stream_id); - -imap_close($stream_id); -?> ---EXPECTF-- -Checking with no parameters - -Warning: imap_headerinfo() expects at least 2 parameters, 0 given in %s on line %d -Checking with incorrect parameter type - -Warning: imap_headerinfo() expects at least 2 parameters, 1 given in %s on line %d - -Warning: imap_headerinfo() expects at least 2 parameters, 1 given in %s on line %d - -Warning: imap_headerinfo() expects at least 2 parameters, 1 given in %s on line %d diff --git a/ext/imap/tests/imap_headers.phpt b/ext/imap/tests/imap_headers.phpt deleted file mode 100644 index 1ff30bfc10..0000000000 --- a/ext/imap/tests/imap_headers.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -imap_headers() incorrect parameter count ---CREDITS-- -Paul Sohier -#phptestfest utrecht ---SKIPIF-- -<?php -require_once(__DIR__.'/skipif.inc'); -?> ---FILE-- -<?php -echo "Checking with no parameters\n"; -imap_headers(); - -echo "Checking with incorrect parameter type\n"; -imap_headers(''); -imap_headers(false); -?> ---EXPECTF-- -Checking with no parameters - -Warning: imap_headers() expects exactly 1 parameter, 0 given in %s on line %d -Checking with incorrect parameter type - -Warning: imap_headers(): Argument #1 must be of type resource, string given in %s on line %d - -Warning: imap_headers(): Argument #1 must be of type resource, bool given in %s on line %d diff --git a/ext/imap/tests/imap_mail_copy.phpt b/ext/imap/tests/imap_mail_copy.phpt deleted file mode 100644 index c82a003a59..0000000000 --- a/ext/imap/tests/imap_mail_copy.phpt +++ /dev/null @@ -1,52 +0,0 @@ ---TEST-- -Test imap_mail_copy() incorrect parameters ---CREDITS-- -Olivier Doucet ---SKIPIF-- -<?php -require_once(__DIR__.'/skipif.inc'); -?> ---FILE-- -<?php -echo "Checking with no parameters\n"; -imap_mail_copy(); - - -echo "Checking with incorrect parameter type\n"; -imap_mail_copy(''); -imap_mail_copy(false); - - -// more tests -require_once(__DIR__.'/imap_include.inc'); - - -echo "Test with IMAP server\n"; -$stream_id = imap_open($default_mailbox, $username, $password) or - die("Cannot connect to mailbox $default_mailbox: " . imap_last_error()); - -var_dump(imap_mail_copy($stream_id)); -var_dump(imap_mail_copy($stream_id,-1)); -var_dump(imap_mail_copy($stream_id, '')); - -imap_close($stream_id); -?> ---EXPECTF-- -Checking with no parameters - -Warning: imap_mail_copy() expects at least 3 parameters, 0 given in %s on line %d -Checking with incorrect parameter type - -Warning: imap_mail_copy() expects at least 3 parameters, 1 given in %s on line %d - -Warning: imap_mail_copy() expects at least 3 parameters, 1 given in %s on line %d -Test with IMAP server - -Warning: imap_mail_copy() expects at least 3 parameters, 1 given in %s on line %d -NULL - -Warning: imap_mail_copy() expects at least 3 parameters, 2 given in %s on line %d -NULL - -Warning: imap_mail_copy() expects at least 3 parameters, 2 given in %s on line %d -NULL diff --git a/ext/imap/tests/imap_mail_move.phpt b/ext/imap/tests/imap_mail_move.phpt deleted file mode 100644 index d6d874b80d..0000000000 --- a/ext/imap/tests/imap_mail_move.phpt +++ /dev/null @@ -1,52 +0,0 @@ ---TEST-- -Test imap_mail_move() incorrect parameters ---CREDITS-- -Olivier Doucet ---SKIPIF-- -<?php -require_once(__DIR__.'/skipif.inc'); -?> ---FILE-- -<?php -echo "Checking with no parameters\n"; -imap_mail_move(); - - -echo "Checking with incorrect parameter type\n"; -imap_mail_move(''); -imap_mail_move(false); - - -// more tests -require_once(__DIR__.'/imap_include.inc'); - - -echo "Test with IMAP server\n"; -$stream_id = imap_open($default_mailbox, $username, $password) or - die("Cannot connect to mailbox $default_mailbox: " . imap_last_error()); - -var_dump(imap_mail_move($stream_id)); -var_dump(imap_mail_move($stream_id,-1)); -var_dump(imap_mail_move($stream_id, '')); - -imap_close($stream_id); -?> ---EXPECTF-- -Checking with no parameters - -Warning: imap_mail_move() expects at least 3 parameters, 0 given in %s on line %d -Checking with incorrect parameter type - -Warning: imap_mail_move() expects at least 3 parameters, 1 given in %s on line %d - -Warning: imap_mail_move() expects at least 3 parameters, 1 given in %s on line %d -Test with IMAP server - -Warning: imap_mail_move() expects at least 3 parameters, 1 given in %s on line %d -NULL - -Warning: imap_mail_move() expects at least 3 parameters, 2 given in %s on line %d -NULL - -Warning: imap_mail_move() expects at least 3 parameters, 2 given in %s on line %d -NULL diff --git a/ext/imap/tests/imap_num_msg_error.phpt b/ext/imap/tests/imap_num_msg_error.phpt deleted file mode 100644 index 28a727ddb2..0000000000 --- a/ext/imap/tests/imap_num_msg_error.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -imap_num_msg() incorrect parameter count ---CREDITS-- -Paul Sohier -#phptestfest utrecht ---SKIPIF-- -<?php -require_once(__DIR__.'/skipif.inc'); -?> ---FILE-- -<?php -echo "Checking with no parameters\n"; -imap_num_msg(); - -echo "Checking with incorrect parameter type\n"; -imap_num_msg(''); -imap_num_msg(false); -?> ---EXPECTF-- -Checking with no parameters - -Warning: imap_num_msg() expects exactly 1 parameter, 0 given in %s on line %d -Checking with incorrect parameter type - -Warning: imap_num_msg(): Argument #1 must be of type resource, string given in %s on line %d - -Warning: imap_num_msg(): Argument #1 must be of type resource, bool given in %s on line %d diff --git a/ext/imap/tests/imap_num_recent_error.phpt b/ext/imap/tests/imap_num_recent_error.phpt deleted file mode 100644 index 0bb877c76d..0000000000 --- a/ext/imap/tests/imap_num_recent_error.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -imap_expunge() incorrect parameter count ---CREDITS-- -Paul Sohier -#phptestfest utrecht ---SKIPIF-- -<?php -require_once(__DIR__.'/skipif.inc'); -?> ---FILE-- -<?php -echo "Checking with no parameters\n"; -imap_expunge(); - -echo "Checking with incorrect parameter type\n"; -imap_expunge(''); -imap_expunge(false); -?> ---EXPECTF-- -Checking with no parameters - -Warning: imap_expunge() expects exactly 1 parameter, 0 given in %s on line %d -Checking with incorrect parameter type - -Warning: imap_expunge(): Argument #1 must be of type resource, string given in %s on line %d - -Warning: imap_expunge(): Argument #1 must be of type resource, bool given in %s on line %d diff --git a/ext/imap/tests/imap_ping_error.phpt b/ext/imap/tests/imap_ping_error.phpt deleted file mode 100644 index 2aedcbddd5..0000000000 --- a/ext/imap/tests/imap_ping_error.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -imap_ping() incorrect parameter count ---CREDITS-- -Paul Sohier -#phptestfest utrecht ---SKIPIF-- -<?php -require_once(__DIR__.'/skipif.inc'); -?> ---FILE-- -<?php -echo "Checking with no parameters\n"; -imap_ping(); - -echo "Checking with incorrect parameter type\n"; -imap_ping(''); -imap_ping(false); -?> ---EXPECTF-- -Checking with no parameters - -Warning: imap_ping() expects exactly 1 parameter, 0 given in %s on line %d -Checking with incorrect parameter type - -Warning: imap_ping(): Argument #1 must be of type resource, string given in %s on line %d - -Warning: imap_ping(): Argument #1 must be of type resource, bool given in %s on line %d diff --git a/ext/imap/tests/imap_undelete_error.phpt b/ext/imap/tests/imap_undelete_error.phpt deleted file mode 100644 index 972c8140c6..0000000000 --- a/ext/imap/tests/imap_undelete_error.phpt +++ /dev/null @@ -1,36 +0,0 @@ ---TEST-- -imap_undelete() incorrect parameter count ---CREDITS-- -Olivier Doucet ---SKIPIF-- -<?php -require_once(__DIR__.'/skipif.inc'); -?> ---FILE-- -<?php -echo "Checking with no parameters\n"; -imap_undelete(); - -echo "Checking with incorrect parameter type\n"; -imap_undelete(''); -imap_undelete(false); - -require_once(__DIR__.'/imap_include.inc'); -$stream_id = imap_open($default_mailbox, $username, $password) or - die("Cannot connect to mailbox $default_mailbox: " . imap_last_error()); - -imap_undelete($stream_id); - -imap_close($stream_id); -?> ---EXPECTF-- -Checking with no parameters - -Warning: imap_undelete() expects at least 2 parameters, 0 given in %s on line %d -Checking with incorrect parameter type - -Warning: imap_undelete() expects at least 2 parameters, 1 given in %s on line %d - -Warning: imap_undelete() expects at least 2 parameters, 1 given in %s on line %d - -Warning: imap_undelete() expects at least 2 parameters, 1 given in %s on line %d |
