mirror of
https://github.com/php/php-src.git
synced 2024-11-29 04:46:07 +08:00
- New tests (testfest DutchUG)
This commit is contained in:
parent
8a8e036175
commit
1bcc3aac33
27
ext/imap/tests/imap_body.phpt
Normal file
27
ext/imap/tests/imap_body.phpt
Normal file
@ -0,0 +1,27 @@
|
||||
--TEST--
|
||||
imap_body() incorrect parameter count
|
||||
--CREDITS--
|
||||
Paul Sohier
|
||||
#phptestfest utrecht
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once(dirname(__FILE__).'/skipif.inc');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
echo "Checking with no parameters\n";
|
||||
imap_body();
|
||||
|
||||
echo "Checking with incorrect parameter type\n";
|
||||
imap_body('');
|
||||
imap_body(false);
|
||||
?>
|
||||
--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
|
27
ext/imap/tests/imap_expunge_error.phpt
Normal file
27
ext/imap/tests/imap_expunge_error.phpt
Normal file
@ -0,0 +1,27 @@
|
||||
--TEST--
|
||||
imap_num_recent() incorrect parameter count
|
||||
--CREDITS--
|
||||
Paul Sohier
|
||||
#phptestfest utrecht
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once(dirname(__FILE__).'/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() 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
|
28
ext/imap/tests/imap_gc_error.phpt
Normal file
28
ext/imap/tests/imap_gc_error.phpt
Normal file
@ -0,0 +1,28 @@
|
||||
--TEST--
|
||||
imap_gc() incorrect parameter count
|
||||
--CREDITS--
|
||||
Paul Sohier
|
||||
#phptestfest utrecht
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once(dirname(__FILE__).'/skipif.inc');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
echo "Checking with no parameters\n";
|
||||
imap_gc();
|
||||
|
||||
echo "Checking with incorrect parameter type\n";
|
||||
imap_gc('', false);
|
||||
imap_gc(false, false);
|
||||
|
||||
?>
|
||||
--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
|
28
ext/imap/tests/imap_headers.phpt
Normal file
28
ext/imap/tests/imap_headers.phpt
Normal file
@ -0,0 +1,28 @@
|
||||
--TEST--
|
||||
imap_headers() incorrect parameter count
|
||||
--CREDITS--
|
||||
Paul Sohier
|
||||
#phptestfest utrecht
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once(dirname(__FILE__).'/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() 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
|
||||
|
28
ext/imap/tests/imap_num_msg_error.phpt
Normal file
28
ext/imap/tests/imap_num_msg_error.phpt
Normal file
@ -0,0 +1,28 @@
|
||||
--TEST--
|
||||
imap_num_msg() incorrect parameter count
|
||||
--CREDITS--
|
||||
Paul Sohier
|
||||
#phptestfest utrecht
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once(dirname(__FILE__).'/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() 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
|
||||
|
27
ext/imap/tests/imap_num_recent_error.phpt
Normal file
27
ext/imap/tests/imap_num_recent_error.phpt
Normal file
@ -0,0 +1,27 @@
|
||||
--TEST--
|
||||
imap_expunge() incorrect parameter count
|
||||
--CREDITS--
|
||||
Paul Sohier
|
||||
#phptestfest utrecht
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once(dirname(__FILE__).'/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() 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
|
42
ext/imap/tests/imap_open_error.phpt
Normal file
42
ext/imap/tests/imap_open_error.phpt
Normal file
@ -0,0 +1,42 @@
|
||||
--TEST--
|
||||
imap_open() incorrect parameter count
|
||||
--CREDITS--
|
||||
Paul Sohier
|
||||
#phptestfest utrecht
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once(dirname(__FILE__).'/skipif.inc');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
echo "Checking with no parameters\n";
|
||||
imap_open();
|
||||
imap_open(false);
|
||||
imap_open(false, false);
|
||||
imap_open('');
|
||||
imap_open('', '');
|
||||
|
||||
echo "Checking with incorrect parameters\n" ;
|
||||
imap_open('', '', '');
|
||||
imap_open('', '', '', -1);
|
||||
|
||||
?>
|
||||
--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
|
27
ext/imap/tests/imap_ping_error.phpt
Normal file
27
ext/imap/tests/imap_ping_error.phpt
Normal file
@ -0,0 +1,27 @@
|
||||
--TEST--
|
||||
imap_ping() incorrect parameter count
|
||||
--CREDITS--
|
||||
Paul Sohier
|
||||
#phptestfest utrecht
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once(dirname(__FILE__).'/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() 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
|
Loading…
Reference in New Issue
Block a user