From fa2b95c95a4195b9804e4daa72724d12e43a7318 Mon Sep 17 00:00:00 2001 From: Zoe Slattery Date: Fri, 28 Aug 2009 14:31:19 +0000 Subject: [PATCH] More tests from 2009 testfest --- ext/gd/tests/imageellipse_error8.phpt | 21 +++++++++++ ext/gd/tests/imagefilltoborder_error7.phpt | 26 +++++++++++++ ext/gd/tests/imagerectangle_error1.phpt | 19 ++++++++++ ext/gd/tests/imagerectangle_error3.phpt | 18 +++++++++ ext/gd/tests/imagerectangle_error8.phpt | 19 ++++++++++ ext/posix/tests/posix_ctermid_error.phpt | 19 ++++++++++ ext/posix/tests/posix_errno_error.phpt | 24 ++++++++++++ ext/posix/tests/posix_geteuid_error1.phpt | 37 +++++++++++++++++++ .../tests/array/key_exists_error.phpt | 23 ++++++++++++ .../general_functions/get_cfg_var_error.phpt | 27 ++++++++++++++ .../getservbyname_error.phpt | 21 +++++++++++ .../getservbyport_error.phpt | 21 +++++++++++ 12 files changed, 275 insertions(+) create mode 100755 ext/gd/tests/imageellipse_error8.phpt create mode 100755 ext/gd/tests/imagefilltoborder_error7.phpt create mode 100755 ext/gd/tests/imagerectangle_error1.phpt create mode 100755 ext/gd/tests/imagerectangle_error3.phpt create mode 100755 ext/gd/tests/imagerectangle_error8.phpt create mode 100644 ext/posix/tests/posix_ctermid_error.phpt create mode 100644 ext/posix/tests/posix_errno_error.phpt create mode 100644 ext/posix/tests/posix_geteuid_error1.phpt create mode 100644 ext/standard/tests/array/key_exists_error.phpt create mode 100644 ext/standard/tests/general_functions/get_cfg_var_error.phpt create mode 100755 ext/standard/tests/general_functions/getservbyname_error.phpt create mode 100644 ext/standard/tests/general_functions/getservbyport_error.phpt diff --git a/ext/gd/tests/imageellipse_error8.phpt b/ext/gd/tests/imageellipse_error8.phpt new file mode 100755 index 0000000000..3575e0b63c --- /dev/null +++ b/ext/gd/tests/imageellipse_error8.phpt @@ -0,0 +1,21 @@ +--TEST-- +Testing wrong param passing imageellipse() of GD library +--CREDITS-- +Ivan Rosolen +#testfest PHPSP on 2009-06-20 +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: Wrong parameter count for imageellipse() in %s.php on line %d diff --git a/ext/gd/tests/imagefilltoborder_error7.phpt b/ext/gd/tests/imagefilltoborder_error7.phpt new file mode 100755 index 0000000000..864181284c --- /dev/null +++ b/ext/gd/tests/imagefilltoborder_error7.phpt @@ -0,0 +1,26 @@ +--TEST-- +Testing wrong param passing imagefilltoborder() of GD library +--CREDITS-- +Ivan Rosolen +#testfest PHPSP on 2009-06-30 +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: Wrong parameter count for imagefilltoborder() in %s.php on line %d diff --git a/ext/gd/tests/imagerectangle_error1.phpt b/ext/gd/tests/imagerectangle_error1.phpt new file mode 100755 index 0000000000..f5b557c15f --- /dev/null +++ b/ext/gd/tests/imagerectangle_error1.phpt @@ -0,0 +1,19 @@ +--TEST-- +Testing wrong param passing imagerectangle() of GD library +--CREDITS-- +Ivan Rosolen +#testfest PHPSP on 2009-06-30 +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: imagerectangle(): supplied argument is not a valid Image resource in %s.php on line %d diff --git a/ext/gd/tests/imagerectangle_error3.phpt b/ext/gd/tests/imagerectangle_error3.phpt new file mode 100755 index 0000000000..4bf00cb594 --- /dev/null +++ b/ext/gd/tests/imagerectangle_error3.phpt @@ -0,0 +1,18 @@ +--TEST-- +Testing wrong param passing imagerectangle() of GD library +--CREDITS-- +Ivan Rosolen +#testfest PHPSP on 2009-06-30 +--SKIPIF-- + +--FILE-- + +--EXPECTF-- diff --git a/ext/gd/tests/imagerectangle_error8.phpt b/ext/gd/tests/imagerectangle_error8.phpt new file mode 100755 index 0000000000..19fa3c430d --- /dev/null +++ b/ext/gd/tests/imagerectangle_error8.phpt @@ -0,0 +1,19 @@ +--TEST-- +Testing wrong param passing imagerectangle() of GD library +--CREDITS-- +Ivan Rosolen +#testfest PHPSP on 2009-06-30 +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: Wrong parameter count for imagerectangle() in %s.php on line %d diff --git a/ext/posix/tests/posix_ctermid_error.phpt b/ext/posix/tests/posix_ctermid_error.phpt new file mode 100644 index 0000000000..30a69ae148 --- /dev/null +++ b/ext/posix/tests/posix_ctermid_error.phpt @@ -0,0 +1,19 @@ +--TEST-- +Test function posix_ctermid() by calling it more than or less than its expected arguments +--SKIPIF-- + +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + +--EXPECTF-- +Warning: Wrong parameter count for posix_ctermid() in %s.php on line %d +NULL diff --git a/ext/posix/tests/posix_errno_error.phpt b/ext/posix/tests/posix_errno_error.phpt new file mode 100644 index 0000000000..99a2cb3b55 --- /dev/null +++ b/ext/posix/tests/posix_errno_error.phpt @@ -0,0 +1,24 @@ +--TEST-- +Test function posix_errno() by calling it with its expected arguments +--SKIPIF-- + +--CREDITS-- +Morten Amundsen mor10am@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + +--EXPECTF-- +*** Test by calling method or function with more than expected arguments *** + +Warning: Wrong parameter count for posix_errno() in %s.php on line %d +NULL diff --git a/ext/posix/tests/posix_geteuid_error1.phpt b/ext/posix/tests/posix_geteuid_error1.phpt new file mode 100644 index 0000000000..a7313c6e0c --- /dev/null +++ b/ext/posix/tests/posix_geteuid_error1.phpt @@ -0,0 +1,37 @@ +--TEST-- +Test function posix_geteuid() by calling it more than or less than its expected arguments +--SKIPIF-- + +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + '1234', 'string' => 'string' ); + +var_dump( posix_geteuid( $extra_args )); +foreach ( $extra_args as $arg ) +{ + var_dump(posix_geteuid( $arg )); +} + +?> +--EXPECTF-- +*** Test by calling method or function with incorrect numbers of arguments *** + +Warning: Wrong parameter count for posix_geteuid() in %s.php on line %d +NULL + +Warning: Wrong parameter count for posix_geteuid() in %s.php on line %d +NULL + +Warning: Wrong parameter count for posix_geteuid() in %s.php on line %d +NULL + +Warning: Wrong parameter count for posix_geteuid() in %s.php on line %d +NULL diff --git a/ext/standard/tests/array/key_exists_error.phpt b/ext/standard/tests/array/key_exists_error.phpt new file mode 100644 index 0000000000..07abdfdb19 --- /dev/null +++ b/ext/standard/tests/array/key_exists_error.phpt @@ -0,0 +1,23 @@ +--TEST-- +Test function key_exists() by calling it more than or less than its expected arguments +--CREDITS-- +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + 1); +var_dump(key_exists()); +var_dump(key_exists('foo', $a, 'baz')); + +?> +--EXPECTF-- +*** Test by calling method or function with incorrect numbers of arguments *** + +Warning: Wrong parameter count for key_exists() in %s.php on line %d +NULL + +Warning: Wrong parameter count for key_exists() in %s.php on line %d +NULL diff --git a/ext/standard/tests/general_functions/get_cfg_var_error.phpt b/ext/standard/tests/general_functions/get_cfg_var_error.phpt new file mode 100644 index 0000000000..427b86060b --- /dev/null +++ b/ext/standard/tests/general_functions/get_cfg_var_error.phpt @@ -0,0 +1,27 @@ +--TEST-- +Test function get_cfg_var() by calling it more than or less than its expected arguments +--CREDITS-- +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--INI-- +session.use_cookies=0 +session.serialize_handler=php +session.save_handler=files +--FILE-- + +--EXPECTF-- +*** Test by calling method or function with incorrect numbers of arguments *** + +Warning: Wrong parameter count for get_cfg_var() in %s.php on line %d +NULL + +Warning: Wrong parameter count for get_cfg_var() in %s.php on line %d +NULL diff --git a/ext/standard/tests/general_functions/getservbyname_error.phpt b/ext/standard/tests/general_functions/getservbyname_error.phpt new file mode 100755 index 0000000000..3169e9aca4 --- /dev/null +++ b/ext/standard/tests/general_functions/getservbyname_error.phpt @@ -0,0 +1,21 @@ +--TEST-- +Test function getservbyname() by calling it more than or less than its expected arguments +--CREDITS-- +Italian PHP TestFest 2009 Cesena 19-20-21 june +Fabio Fabbrucci (fabbrucci@grupporetina.com) +Michele Orselli (mo@ideato.it) +Danilo Sanchi (sanchi@grupporetina.com) +--FILE-- + +--EXPECTF-- +Warning: Wrong parameter count for getservbyname() in %s.php on line %d +NULL + +Warning: Wrong parameter count for getservbyname() in %s.php on line %d +NULL diff --git a/ext/standard/tests/general_functions/getservbyport_error.phpt b/ext/standard/tests/general_functions/getservbyport_error.phpt new file mode 100644 index 0000000000..7cd606cf1e --- /dev/null +++ b/ext/standard/tests/general_functions/getservbyport_error.phpt @@ -0,0 +1,21 @@ +--TEST-- +Test function getservbyport() by calling it more than or less than its expected arguments +--CREDITS-- +Italian PHP TestFest 2009 Cesena 19-20-21 june +Fabio Fabbrucci (fabbrucci@grupporetina.com) +Michele Orselli (mo@ideato.it) +Simone Gentili (sensorario@gmail.com) +--FILE-- + +--EXPECTF-- +Warning: Wrong parameter count for getservbyport() in %s.php on line %d +NULL + +Warning: Wrong parameter count for getservbyport() in %s.php on line %d +NULL -- 2.50.1