From 1bcc3aac334ed98c66d727a655b7dfc3de91ddf6 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Sat, 16 May 2009 21:13:43 +0000 Subject: [PATCH] - New tests (testfest DutchUG) --- ext/imap/tests/imap_body.phpt | 27 +++++++++++++++ ext/imap/tests/imap_expunge_error.phpt | 27 +++++++++++++++ ext/imap/tests/imap_gc_error.phpt | 28 +++++++++++++++ ext/imap/tests/imap_headers.phpt | 28 +++++++++++++++ ext/imap/tests/imap_num_msg_error.phpt | 28 +++++++++++++++ ext/imap/tests/imap_num_recent_error.phpt | 27 +++++++++++++++ ext/imap/tests/imap_open_error.phpt | 42 +++++++++++++++++++++++ ext/imap/tests/imap_ping_error.phpt | 27 +++++++++++++++ 8 files changed, 234 insertions(+) create mode 100644 ext/imap/tests/imap_body.phpt create mode 100644 ext/imap/tests/imap_expunge_error.phpt create mode 100644 ext/imap/tests/imap_gc_error.phpt create mode 100644 ext/imap/tests/imap_headers.phpt create mode 100644 ext/imap/tests/imap_num_msg_error.phpt create mode 100644 ext/imap/tests/imap_num_recent_error.phpt create mode 100644 ext/imap/tests/imap_open_error.phpt create mode 100644 ext/imap/tests/imap_ping_error.phpt diff --git a/ext/imap/tests/imap_body.phpt b/ext/imap/tests/imap_body.phpt new file mode 100644 index 0000000000..08f63db47d --- /dev/null +++ b/ext/imap/tests/imap_body.phpt @@ -0,0 +1,27 @@ +--TEST-- +imap_body() incorrect parameter count +--CREDITS-- +Paul Sohier +#phptestfest utrecht +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Checking with no parameters + +Warning: imap_body() expects at least 2 parameters, 0 given in %s on line %d +Checking with incorrect parameter type + +Warning: imap_body() expects at least 2 parameters, 1 given in %s on line %d + +Warning: imap_body() expects at least 2 parameters, 1 given in %s on line %d diff --git a/ext/imap/tests/imap_expunge_error.phpt b/ext/imap/tests/imap_expunge_error.phpt new file mode 100644 index 0000000000..d99dcf0ff1 --- /dev/null +++ b/ext/imap/tests/imap_expunge_error.phpt @@ -0,0 +1,27 @@ +--TEST-- +imap_num_recent() incorrect parameter count +--CREDITS-- +Paul Sohier +#phptestfest utrecht +--SKIPIF-- + +--FILE-- + +--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() expects parameter 1 to be resource, %unicode_string_optional% given in %s on line %d + +Warning: imap_num_recent() expects parameter 1 to be resource, boolean given in %s on line %d diff --git a/ext/imap/tests/imap_gc_error.phpt b/ext/imap/tests/imap_gc_error.phpt new file mode 100644 index 0000000000..c0830c000d --- /dev/null +++ b/ext/imap/tests/imap_gc_error.phpt @@ -0,0 +1,28 @@ +--TEST-- +imap_gc() incorrect parameter count +--CREDITS-- +Paul Sohier +#phptestfest utrecht +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Checking with no parameters + +Warning: imap_gc() expects exactly 2 parameters, 0 given in %s on line %d +Checking with incorrect parameter type + +Warning: imap_gc() expects parameter 1 to be resource, %unicode_string_optional% given in %s on line %d + +Warning: imap_gc() expects parameter 1 to be resource, boolean given in %s on line %d diff --git a/ext/imap/tests/imap_headers.phpt b/ext/imap/tests/imap_headers.phpt new file mode 100644 index 0000000000..93c51f9a28 --- /dev/null +++ b/ext/imap/tests/imap_headers.phpt @@ -0,0 +1,28 @@ +--TEST-- +imap_headers() incorrect parameter count +--CREDITS-- +Paul Sohier +#phptestfest utrecht +--SKIPIF-- + +--FILE-- + +--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() expects parameter 1 to be resource, %unicode_string_optional% given in %s on line %d + +Warning: imap_headers() expects parameter 1 to be resource, boolean given in %s on line %d + diff --git a/ext/imap/tests/imap_num_msg_error.phpt b/ext/imap/tests/imap_num_msg_error.phpt new file mode 100644 index 0000000000..6c4f50e021 --- /dev/null +++ b/ext/imap/tests/imap_num_msg_error.phpt @@ -0,0 +1,28 @@ +--TEST-- +imap_num_msg() incorrect parameter count +--CREDITS-- +Paul Sohier +#phptestfest utrecht +--SKIPIF-- + +--FILE-- + +--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() expects parameter 1 to be resource, %unicode_string_optional% given in %s on line %d + +Warning: imap_num_msg() expects parameter 1 to be resource, boolean 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 new file mode 100644 index 0000000000..e723473b7e --- /dev/null +++ b/ext/imap/tests/imap_num_recent_error.phpt @@ -0,0 +1,27 @@ +--TEST-- +imap_expunge() incorrect parameter count +--CREDITS-- +Paul Sohier +#phptestfest utrecht +--SKIPIF-- + +--FILE-- + +--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() expects parameter 1 to be resource, %unicode_string_optional% given in %s on line %d + +Warning: imap_expunge() expects parameter 1 to be resource, boolean given in %s on line %d diff --git a/ext/imap/tests/imap_open_error.phpt b/ext/imap/tests/imap_open_error.phpt new file mode 100644 index 0000000000..7934ee2ef7 --- /dev/null +++ b/ext/imap/tests/imap_open_error.phpt @@ -0,0 +1,42 @@ +--TEST-- +imap_open() incorrect parameter count +--CREDITS-- +Paul Sohier +#phptestfest utrecht +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Checking with no parameters + +Warning: imap_open() expects at least 3 parameters, 0 given in %s on line %d + +Warning: imap_open() expects at least 3 parameters, 1 given in %s on line %d + +Warning: imap_open() expects at least 3 parameters, 2 given in %s on line %d + +Warning: imap_open() expects at least 3 parameters, 1 given in %s on line %d + +Warning: imap_open() expects at least 3 parameters, 2 given in %s on line %d +Checking with incorrect parameters + +Warning: imap_open(): Couldn't open stream in %s on line %d + +Warning: imap_open(): Couldn't open stream in %s on line %d + +Notice: Unknown: Can't open mailbox : no such mailbox (errflg=2) in Unknown on line 0 diff --git a/ext/imap/tests/imap_ping_error.phpt b/ext/imap/tests/imap_ping_error.phpt new file mode 100644 index 0000000000..7c87867bdc --- /dev/null +++ b/ext/imap/tests/imap_ping_error.phpt @@ -0,0 +1,27 @@ +--TEST-- +imap_ping() incorrect parameter count +--CREDITS-- +Paul Sohier +#phptestfest utrecht +--SKIPIF-- + +--FILE-- + +--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() expects parameter 1 to be resource, %unicode_string_optional% given in %s on line %d + +Warning: imap_ping() expects parameter 1 to be resource, boolean given in %s on line %d -- 2.50.1