diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-02-19 17:11:00 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-03-11 11:32:20 +0100 |
commit | 852485d8ecd784153e41e565a0a87abf99cf4e0d (patch) | |
tree | 3c8be88c2c98b5f1b2f9ea51e5d3a20c10baf3ff /ext/posix | |
parent | 6bfb119e18e5241b6719a4ad69223d91c465a58e (diff) | |
download | php-git-852485d8ecd784153e41e565a0a87abf99cf4e0d.tar.gz |
Adjust tests for zpp TypeError change
Diffstat (limited to 'ext/posix')
-rw-r--r-- | ext/posix/tests/posix_errno_error.phpt | 24 | ||||
-rw-r--r-- | ext/posix/tests/posix_getcwd.phpt | 4 | ||||
-rw-r--r-- | ext/posix/tests/posix_getgrgid_error.phpt | 21 | ||||
-rw-r--r-- | ext/posix/tests/posix_getpgid_error.phpt | 18 | ||||
-rw-r--r-- | ext/posix/tests/posix_getpwuid_error.phpt | 18 | ||||
-rw-r--r-- | ext/posix/tests/posix_getsid_error.phpt | 7 | ||||
-rw-r--r-- | ext/posix/tests/posix_initgroups.phpt | 3 | ||||
-rw-r--r-- | ext/posix/tests/posix_kill_error.phpt | 20 | ||||
-rw-r--r-- | ext/posix/tests/posix_seteuid_variation4.phpt | 46 | ||||
-rw-r--r-- | ext/posix/tests/posix_setgid_variation4.phpt | 46 | ||||
-rw-r--r-- | ext/posix/tests/posix_setuid_variation4.phpt | 46 | ||||
-rw-r--r-- | ext/posix/tests/posix_strerror_error.phpt | 18 | ||||
-rw-r--r-- | ext/posix/tests/posix_ttyname_error_wrongparams.phpt | 3 |
13 files changed, 0 insertions, 274 deletions
diff --git a/ext/posix/tests/posix_errno_error.phpt b/ext/posix/tests/posix_errno_error.phpt deleted file mode 100644 index 0a77fb0009..0000000000 --- a/ext/posix/tests/posix_errno_error.phpt +++ /dev/null @@ -1,24 +0,0 @@ ---TEST-- -Test function posix_errno() by calling it with its expected arguments ---SKIPIF-- -<?php - if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; -?> ---CREDITS-- -Morten Amundsen mor10am@gmail.com -Francesco Fullone ff@ideato.it -#PHPTestFest Cesena Italia on 2009-06-20 ---FILE-- -<?php - -echo "*** Test by calling method or function with more than expected arguments ***\n"; - -// test without any error -var_dump(posix_errno('bar')); - -?> ---EXPECTF-- -*** Test by calling method or function with more than expected arguments *** - -Warning: posix_errno() expects exactly 0 parameters, 1 given in %s on line %d -NULL diff --git a/ext/posix/tests/posix_getcwd.phpt b/ext/posix/tests/posix_getcwd.phpt index 20f7b0372e..f6f180925a 100644 --- a/ext/posix/tests/posix_getcwd.phpt +++ b/ext/posix/tests/posix_getcwd.phpt @@ -9,11 +9,7 @@ if (!function_exists('posix_getcwd')) die('skip posix_getcwd() not found'); <?php var_dump(posix_getcwd()); -var_dump(posix_getcwd(1)); ?> --EXPECTF-- string(%d) "%s" - -Warning: posix_getcwd() expects exactly 0 parameters, 1 given in %s on line %d -NULL diff --git a/ext/posix/tests/posix_getgrgid_error.phpt b/ext/posix/tests/posix_getgrgid_error.phpt index ef7fa57a9d..e9dbe2a6ce 100644 --- a/ext/posix/tests/posix_getgrgid_error.phpt +++ b/ext/posix/tests/posix_getgrgid_error.phpt @@ -14,17 +14,6 @@ Test posix_getgrgid() function : error conditions echo "*** Testing posix_getgrgid() : error conditions ***\n"; -// Zero arguments -echo "\n-- Testing posix_getgrgid() function with Zero arguments --\n"; -var_dump( posix_getgrgid() ); - -//Test posix_getgrgid with one more than the expected number of arguments -echo "\n-- Testing posix_getgrgid() function with more than expected no. of arguments --\n"; - -$extra_arg = 10; -$gid = 0; -var_dump( posix_getgrgid($gid, $extra_arg) ); - echo "\n-- Testing posix_getgrgid() function with a negative group id --\n"; $gid = -999; var_dump( posix_getgrgid($gid)); @@ -34,16 +23,6 @@ echo "Done"; --EXPECTF-- *** Testing posix_getgrgid() : error conditions *** --- Testing posix_getgrgid() function with Zero arguments -- - -Warning: posix_getgrgid() expects exactly 1 parameter, 0 given in %s on line %d -bool(false) - --- Testing posix_getgrgid() function with more than expected no. of arguments -- - -Warning: posix_getgrgid() expects exactly 1 parameter, 2 given in %s on line %d -bool(false) - -- Testing posix_getgrgid() function with a negative group id -- bool(false) Done diff --git a/ext/posix/tests/posix_getpgid_error.phpt b/ext/posix/tests/posix_getpgid_error.phpt index 88d68554ee..19e306b2ee 100644 --- a/ext/posix/tests/posix_getpgid_error.phpt +++ b/ext/posix/tests/posix_getpgid_error.phpt @@ -16,14 +16,6 @@ if((!extension_loaded("posix")) || (!function_exists("posix_getpgid"))) { echo "*** Testing posix_getpgid() : error conditions ***\n"; -echo "\n-- Testing posix_getpgid() function no arguments --\n"; -var_dump( posix_getpgid() ); - -echo "\n-- Testing posix_getpgid() with one extra argument --\n"; -$pid = 10; -$extra_arg = 20; -var_dump( posix_getpgid($pid, $extra_arg) ); - echo "\n-- Testing posix_getpgid() with negative pid --\n"; $pid = -99; var_dump( posix_getpgid($pid) ); @@ -33,16 +25,6 @@ echo "Done"; --EXPECTF-- *** Testing posix_getpgid() : error conditions *** --- Testing posix_getpgid() function no arguments -- - -Warning: posix_getpgid() expects exactly 1 parameter, 0 given in %s on line %d -bool(false) - --- Testing posix_getpgid() with one extra argument -- - -Warning: posix_getpgid() expects exactly 1 parameter, 2 given in %s on line %d -bool(false) - -- Testing posix_getpgid() with negative pid -- bool(false) Done diff --git a/ext/posix/tests/posix_getpwuid_error.phpt b/ext/posix/tests/posix_getpwuid_error.phpt index 440edf6a76..365033b689 100644 --- a/ext/posix/tests/posix_getpwuid_error.phpt +++ b/ext/posix/tests/posix_getpwuid_error.phpt @@ -14,14 +14,6 @@ Test posix_getpwuid() function : error conditions echo "*** Testing posix_getpwuid() : error conditions ***\n"; -echo "\n-- Testing posix_getpwuid() function with Zero arguments --\n"; -var_dump( posix_getpwuid() ); - -echo "\n-- Testing posix_getpwuid() function with more than expected no. of arguments --\n"; -$uid = posix_getuid(); -$extra_arg = 10; -var_dump( posix_getpwuid($uid, $extra_arg) ); - echo "\n-- Testing posix_getpwuid() function negative uid --\n"; $uid = -99; var_dump( posix_getpwuid($uid) ); @@ -31,16 +23,6 @@ echo "Done"; --EXPECTF-- *** Testing posix_getpwuid() : error conditions *** --- Testing posix_getpwuid() function with Zero arguments -- - -Warning: posix_getpwuid() expects exactly 1 parameter, 0 given in %s on line %d -bool(false) - --- Testing posix_getpwuid() function with more than expected no. of arguments -- - -Warning: posix_getpwuid() expects exactly 1 parameter, 2 given in %s on line %d -bool(false) - -- Testing posix_getpwuid() function negative uid -- bool(false) Done diff --git a/ext/posix/tests/posix_getsid_error.phpt b/ext/posix/tests/posix_getsid_error.phpt index 6013a40b96..833ae9a0db 100644 --- a/ext/posix/tests/posix_getsid_error.phpt +++ b/ext/posix/tests/posix_getsid_error.phpt @@ -13,16 +13,9 @@ PHP Testfest Berlin 2009-05-10 ?> --FILE-- <?php -var_dump( posix_getsid() ); -var_dump( posix_getsid(array()) ); var_dump( posix_getsid(-1) ); ?> ===DONE=== --EXPECTF-- -Warning: posix_getsid() expects exactly 1 parameter, 0 given in %s on line %d -bool(false) - -Warning: posix_getsid() expects parameter 1 to be int, array given in %s on line %d -bool(false) bool(false) ===DONE=== diff --git a/ext/posix/tests/posix_initgroups.phpt b/ext/posix/tests/posix_initgroups.phpt index 5b0ec8adad..20cf8cef8b 100644 --- a/ext/posix/tests/posix_initgroups.phpt +++ b/ext/posix/tests/posix_initgroups.phpt @@ -8,11 +8,8 @@ if (!function_exists('posix_initgroups')) die('skip posix_initgroups() not found --FILE-- <?php -var_dump(posix_initgroups('foo', 'bar')); var_dump(posix_initgroups(NULL, NULL)); ?> --EXPECTF-- -Warning: posix_initgroups() expects parameter 2 to be int, string given in %s on line %d -bool(false) bool(false) diff --git a/ext/posix/tests/posix_kill_error.phpt b/ext/posix/tests/posix_kill_error.phpt index 0c8f6ef642..89474c4994 100644 --- a/ext/posix/tests/posix_kill_error.phpt +++ b/ext/posix/tests/posix_kill_error.phpt @@ -16,16 +16,6 @@ Test posix_kill() function : error conditions echo "*** Testing posix_kill() : error conditions ***\n"; -echo "\n-- Testing posix_kill() function with more than expected no. of arguments --\n"; -$pid = posix_getpid(); -$sig = 9; -$extra_arg = 10; -var_dump( posix_kill($pid, $sig, $extra_arg) ); - -echo "\n-- Testing posix_kill() function with less than expected no. of arguments --\n"; -$pid = posix_getpid(); -var_dump( posix_kill($pid) ); - echo "\n-- Testing posix_kill() function with invalid signal --\n"; $pid = posix_getpid(); $sig = 999; @@ -41,16 +31,6 @@ echo "Done"; --EXPECTF-- *** Testing posix_kill() : error conditions *** --- Testing posix_kill() function with more than expected no. of arguments -- - -Warning: posix_kill() expects exactly 2 parameters, 3 given in %s on line %d -bool(false) - --- Testing posix_kill() function with less than expected no. of arguments -- - -Warning: posix_kill() expects exactly 2 parameters, 1 given in %s on line %d -bool(false) - -- Testing posix_kill() function with invalid signal -- bool(false) diff --git a/ext/posix/tests/posix_seteuid_variation4.phpt b/ext/posix/tests/posix_seteuid_variation4.phpt deleted file mode 100644 index 4224bafa82..0000000000 --- a/ext/posix/tests/posix_seteuid_variation4.phpt +++ /dev/null @@ -1,46 +0,0 @@ ---TEST-- -Test function posix_seteuid() by substituting argument 1 with float values. ---SKIPIF-- -<?php - PHP_INT_SIZE == 4 or die("skip - 32-bit only"); - if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; - if(posix_geteuid() == 0) print "skip - Cannot run test as root."; -?> ---CREDITS-- -Marco Fabbri mrfabbri@gmail.com -Francesco Fullone ff@ideato.it -#PHPTestFest Cesena Italia on 2009-06-20 ---FILE-- -<?php - - -echo "*** Test substituting argument 1 with float values ***\n"; - -$myUid = posix_getuid(); - -$myUid = $myUid - 1.1; - -$variation_array = array( - 'float '.$myUid => $myUid, - 'float -'.$myUid => -$myUid, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - ); - - -foreach ( $variation_array as $var ) { - var_dump(posix_seteuid( $var ) ); -} -?> ---EXPECTF-- -*** Test substituting argument 1 with float values *** -bool(false) -bool(false) - -Warning: posix_seteuid() expects parameter 1 to be int, float given in %s on line %d -bool(false) - -Warning: posix_seteuid() expects parameter 1 to be int, float given in %s on line %d -bool(false) -bool(false) diff --git a/ext/posix/tests/posix_setgid_variation4.phpt b/ext/posix/tests/posix_setgid_variation4.phpt deleted file mode 100644 index d85b5a900a..0000000000 --- a/ext/posix/tests/posix_setgid_variation4.phpt +++ /dev/null @@ -1,46 +0,0 @@ ---TEST-- -Test function posix_setgid() by substituting argument 1 with float values. ---SKIPIF-- -<?php - PHP_INT_SIZE == 4 or die("skip - 32-bit only"); - if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; - if(posix_geteuid() == 0) print "skip - Cannot run test as root."; -?> ---CREDITS-- -Marco Fabbri mrfabbri@gmail.com -Francesco Fullone ff@ideato.it -#PHPTestFest Cesena Italia on 2009-06-20 ---FILE-- -<?php - - -echo "*** Test substituting argument 1 with float values ***\n"; - - - -$variation_array = array( - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - ); - - -foreach ( $variation_array as $var ) { - var_dump(posix_setgid( $var ) ); -} -?> -===DONE=== ---EXPECTF-- -*** Test substituting argument 1 with float values *** -bool(false) -bool(false) - -Warning: posix_setgid() expects parameter 1 to be int, float given in %s on line %d -bool(false) - -Warning: posix_setgid() expects parameter 1 to be int, float given in %s on line %d -bool(false) -bool(false) -===DONE=== diff --git a/ext/posix/tests/posix_setuid_variation4.phpt b/ext/posix/tests/posix_setuid_variation4.phpt deleted file mode 100644 index 7423ba324e..0000000000 --- a/ext/posix/tests/posix_setuid_variation4.phpt +++ /dev/null @@ -1,46 +0,0 @@ ---TEST-- -Test function posix_setuid() by substituting argument 1 with float values. ---SKIPIF-- -<?php - PHP_INT_SIZE == 4 or die("skip - 32-bit only"); - if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; - if(posix_geteuid() == 0) print "skip - Cannot run test as root."; -?> ---CREDITS-- -Marco Fabbri mrfabbri@gmail.com -Francesco Fullone ff@ideato.it -#PHPTestFest Cesena Italia on 2009-06-20 ---FILE-- -<?php - - -echo "*** Test substituting argument 1 with float values ***\n"; - -$myUid = posix_getuid(); - -$myUid = $myUid - 1.1; - -$variation_array = array( - 'float '.$myUid => $myUid, - 'float -'.$myUid => -$myUid, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - ); - - -foreach ( $variation_array as $var ) { - var_dump(posix_setuid( $var ) ); -} -?> ---EXPECTF-- -*** Test substituting argument 1 with float values *** -bool(false) -bool(false) - -Warning: posix_setuid() expects parameter 1 to be int, float given in %s on line %d -bool(false) - -Warning: posix_setuid() expects parameter 1 to be int, float given in %s on line %d -bool(false) -bool(false) diff --git a/ext/posix/tests/posix_strerror_error.phpt b/ext/posix/tests/posix_strerror_error.phpt index 3007f976c6..60b096656a 100644 --- a/ext/posix/tests/posix_strerror_error.phpt +++ b/ext/posix/tests/posix_strerror_error.phpt @@ -14,14 +14,6 @@ Test posix_strerror() function : error conditions echo "*** Testing posix_strerror() : error conditions ***\n"; -echo "\n-- Testing posix_strerror() function with Zero arguments --\n"; -var_dump( posix_strerror() ); - -echo "\n-- Testing posix_strerror() function with more than expected no. of arguments --\n"; -$errno = posix_get_last_error(); -$extra_arg = 10; -var_dump( posix_strerror($errno, $extra_arg) ); - echo "\n-- Testing posix_strerror() function with invalid error number --\n"; $errno = -999; echo gettype( posix_strerror($errno) )."\n"; @@ -31,16 +23,6 @@ echo "Done"; --EXPECTF-- *** Testing posix_strerror() : error conditions *** --- Testing posix_strerror() function with Zero arguments -- - -Warning: posix_strerror() expects exactly 1 parameter, 0 given in %s on line %d -bool(false) - --- Testing posix_strerror() function with more than expected no. of arguments -- - -Warning: posix_strerror() expects exactly 1 parameter, 2 given in %s on line %d -bool(false) - -- Testing posix_strerror() function with invalid error number -- string Done diff --git a/ext/posix/tests/posix_ttyname_error_wrongparams.phpt b/ext/posix/tests/posix_ttyname_error_wrongparams.phpt index 158a2d0ca7..ba340db300 100644 --- a/ext/posix/tests/posix_ttyname_error_wrongparams.phpt +++ b/ext/posix/tests/posix_ttyname_error_wrongparams.phpt @@ -20,14 +20,11 @@ PHP Testfest Berlin 2009-05-10 ?> --FILE-- <?php - var_dump(posix_ttyname()); // param missing var_dump(posix_ttyname(0)); // param not a ressource var_dump(posix_ttyname(imagecreate(1, 1))); // wrong resource type ?> ===DONE=== --EXPECTF-- -Warning: posix_ttyname() expects exactly 1 parameter, 0 given in %s on line %d -bool(false) bool(false) Warning: posix_ttyname(): supplied resource is not a valid stream resource in %s on line %d |