diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-02-01 12:57:55 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-02-05 09:38:55 +0100 |
commit | 8bc663f43bb3f556866a2f804c422646c4da56f2 (patch) | |
tree | 8b15beb7927b03369e69ec0545c354a7f7f9371b /ext/posix | |
parent | da919a8b658bf65ff0705bc03c28c7be085d6329 (diff) | |
download | php-git-8bc663f43bb3f556866a2f804c422646c4da56f2.tar.gz |
Remove zpp variation tests
Diffstat (limited to 'ext/posix')
-rw-r--r-- | ext/posix/tests/posix_getgrgid_variation.phpt | 188 | ||||
-rw-r--r-- | ext/posix/tests/posix_getpgid_variation.phpt | 188 | ||||
-rw-r--r-- | ext/posix/tests/posix_getpwuid_variation.phpt | 188 | ||||
-rw-r--r-- | ext/posix/tests/posix_kill_variation1.phpt | 182 | ||||
-rw-r--r-- | ext/posix/tests/posix_kill_variation2.phpt | 182 | ||||
-rw-r--r-- | ext/posix/tests/posix_seteuid_variation3.phpt | 48 | ||||
-rw-r--r-- | ext/posix/tests/posix_setgid_variation3.phpt | 48 | ||||
-rw-r--r-- | ext/posix/tests/posix_setuid_variation3.phpt | 48 | ||||
-rw-r--r-- | ext/posix/tests/posix_strerror_variation1.phpt | 181 |
9 files changed, 0 insertions, 1253 deletions
diff --git a/ext/posix/tests/posix_getgrgid_variation.phpt b/ext/posix/tests/posix_getgrgid_variation.phpt deleted file mode 100644 index 9bf807ad14..0000000000 --- a/ext/posix/tests/posix_getgrgid_variation.phpt +++ /dev/null @@ -1,188 +0,0 @@ ---TEST-- -Test posix_getgrgid() function : usage variations - parameter types ---SKIPIF-- -<?php - PHP_INT_SIZE == 4 or die("skip - 32-bit only"); - if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; -?> ---FILE-- -<?php -/* Prototype : proto array posix_getgrgid(long gid) - * Description: Group database access (POSIX.1, 9.2.1) - * Source code: ext/posix/posix.c - * Alias to functions: - */ - -echo "*** Testing posix_getgrgid() : usage variations ***\n"; - -// Initialise function arguments not being substituted (if any) - -//get an unset variable -$unset_var = 10; -unset ($unset_var); - -//array of values to iterate over -$values = array( - - // float data - 10.5, - -10.5, - 10.1234567e10, - 10.7654321E-10, - .5, - - // array data - array(), - array(0), - array(1), - array(1, 2), - array('color' => 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // undefined data - $undefined_var, - - // unset data - $unset_var, - - // object data - new stdclass(), -); - -// loop through each element of the array for gid - -foreach($values as $value) { - echo "\nArg value $value \n"; - $result = posix_getgrgid($value); - if ((is_array($result) && (count($result) == 4)) - || - ($result === false)) { - echo "valid output\n"; - } else { - var_dump($result); - } -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing posix_getgrgid() : usage variations *** - -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d - -Arg value 10.5 -valid output - -Arg value -10.5 -valid output - -Arg value 101234567000 - -Warning: posix_getgrgid() expects parameter 1 to be int, float given in %s on line %d -valid output - -Arg value 1.07654321E-9 -valid output - -Arg value 0.5 -valid output - -Notice: Array to string conversion in %sposix_getgrgid_variation.php on line %d - -Arg value Array - -Warning: posix_getgrgid() expects parameter 1 to be int, array given in %s on line %d -valid output - -Notice: Array to string conversion in %sposix_getgrgid_variation.php on line %d - -Arg value Array - -Warning: posix_getgrgid() expects parameter 1 to be int, array given in %s on line %d -valid output - -Notice: Array to string conversion in %sposix_getgrgid_variation.php on line %d - -Arg value Array - -Warning: posix_getgrgid() expects parameter 1 to be int, array given in %s on line %d -valid output - -Notice: Array to string conversion in %sposix_getgrgid_variation.php on line %d - -Arg value Array - -Warning: posix_getgrgid() expects parameter 1 to be int, array given in %s on line %d -valid output - -Notice: Array to string conversion in %sposix_getgrgid_variation.php on line %d - -Arg value Array - -Warning: posix_getgrgid() expects parameter 1 to be int, array given in %s on line %d -valid output - -Arg value -valid output - -Arg value -valid output - -Arg value 1 -valid output - -Arg value -valid output - -Arg value 1 -valid output - -Arg value -valid output - -Arg value - -Warning: posix_getgrgid() expects parameter 1 to be int, string given in %s on line %d -valid output - -Arg value - -Warning: posix_getgrgid() expects parameter 1 to be int, string given in %s on line %d -valid output - -Arg value string - -Warning: posix_getgrgid() expects parameter 1 to be int, string given in %s on line %d -valid output - -Arg value string - -Warning: posix_getgrgid() expects parameter 1 to be int, string given in %s on line %d -valid output - -Arg value -valid output - -Arg value -valid output - -Recoverable fatal error: Object of class stdClass could not be converted to string in %s on line %d diff --git a/ext/posix/tests/posix_getpgid_variation.phpt b/ext/posix/tests/posix_getpgid_variation.phpt deleted file mode 100644 index 6a5e7fd5a9..0000000000 --- a/ext/posix/tests/posix_getpgid_variation.phpt +++ /dev/null @@ -1,188 +0,0 @@ ---TEST-- -Test posix_getpgid() function : variation ---SKIPIF-- -<?php -PHP_INT_SIZE == 4 or die("skip - 32-bit only"); -if((!extension_loaded("posix")) || (!function_exists("posix_getpgid"))) { - print "skip - POSIX extension not loaded or posix_getpgid() does not exist"; -} -?> ---FILE-- -<?php -/* Prototype : proto int posix_getpgid(void) - * Description: Get the process group id of the specified process (This is not a POSIX function, but a SVR4ism, so we compile conditionally) - * Source code: ext/posix/posix.c - * Alias to functions: - */ - -echo "*** Testing posix_getpgid() : usage variations ***\n"; - -// Initialise function arguments not being substituted (if any) - -//get an unset variable -$unset_var = 10; -unset ($unset_var); - -//array of values to iterate over -$values = array( - - // float data - 10.5, - -10.5, - 10.1234567e10, - 10.7654321E-10, - .5, - - // array data - array(), - array(0), - array(1), - array(1, 2), - array('color' => 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // undefined data - $undefined_var, - - // unset data - $unset_var, - - // object data - new stdclass(), -); - -// loop through each element of the array for gid - -foreach($values as $value) { - echo "\nArg value $value \n"; - $result = posix_getpgid($value); - if (is_int($result) || $result === false) { - echo "valid output\n"; - } else { - var_dump($result); - } -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing posix_getpgid() : usage variations *** - -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d - -Arg value 10.5 -valid output - -Arg value -10.5 -valid output - -Arg value 101234567000 - -Warning: posix_getpgid() expects parameter 1 to be int, float given in %s on line %d -valid output - -Arg value 1.07654321E-9 -valid output - -Arg value 0.5 -valid output - -Notice: Array to string conversion in %sposix_getpgid_variation.php on line %d - -Arg value Array - -Warning: posix_getpgid() expects parameter 1 to be int, array given in %s on line %d -valid output - -Notice: Array to string conversion in %sposix_getpgid_variation.php on line %d - -Arg value Array - -Warning: posix_getpgid() expects parameter 1 to be int, array given in %s on line %d -valid output - -Notice: Array to string conversion in %sposix_getpgid_variation.php on line %d - -Arg value Array - -Warning: posix_getpgid() expects parameter 1 to be int, array given in %s on line %d -valid output - -Notice: Array to string conversion in %sposix_getpgid_variation.php on line %d - -Arg value Array - -Warning: posix_getpgid() expects parameter 1 to be int, array given in %s on line %d -valid output - -Notice: Array to string conversion in %sposix_getpgid_variation.php on line %d - -Arg value Array - -Warning: posix_getpgid() expects parameter 1 to be int, array given in %s on line %d -valid output - -Arg value -valid output - -Arg value -valid output - -Arg value 1 -valid output - -Arg value -valid output - -Arg value 1 -valid output - -Arg value -valid output - -Arg value - -Warning: posix_getpgid() expects parameter 1 to be int, string given in %s on line %d -valid output - -Arg value - -Warning: posix_getpgid() expects parameter 1 to be int, string given in %s on line %d -valid output - -Arg value string - -Warning: posix_getpgid() expects parameter 1 to be int, string given in %s on line %d -valid output - -Arg value string - -Warning: posix_getpgid() expects parameter 1 to be int, string given in %s on line %d -valid output - -Arg value -valid output - -Arg value -valid output - -Recoverable fatal error: Object of class stdClass could not be converted to string in %s on line %d diff --git a/ext/posix/tests/posix_getpwuid_variation.phpt b/ext/posix/tests/posix_getpwuid_variation.phpt deleted file mode 100644 index ca57d2cc83..0000000000 --- a/ext/posix/tests/posix_getpwuid_variation.phpt +++ /dev/null @@ -1,188 +0,0 @@ ---TEST-- -Test posix_getpwuid() function : usage variations - parameter types ---SKIPIF-- -<?php - PHP_INT_SIZE == 4 or die("skip - 32-bit only"); - if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; -?> ---FILE-- -<?php -/* Prototype : proto array posix_getpwuid(long uid) - * Description: User database access (POSIX.1, 9.2.2) - * Source code: ext/posix/posix.c - * Alias to functions: - */ - -echo "*** Testing posix_getpwuid() : usage variations ***\n"; - -// Initialise function arguments not being substituted (if any) - -//get an unset variable -$unset_var = 10; -unset ($unset_var); - -//array of values to iterate over -$values = array( - - // float data - 10.5, - -10.5, - 10.1234567e10, - 10.7654321E-10, - .5, - - // array data - array(), - array(0), - array(1), - array(1, 2), - array('color' => 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // undefined data - $undefined_var, - - // unset data - $unset_var, - - // object data - new stdclass(), -); - -// loop through each element of the array for uid - -foreach($values as $value) { - echo "\nArg value $value \n"; - $result = posix_getpwuid($value); - if ((is_array($result) && (count($result) == 7)) - || - ($result === false)) { - echo "valid output\n"; - } else { - var_dump($result); - } -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing posix_getpwuid() : usage variations *** - -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d - -Arg value 10.5 -valid output - -Arg value -10.5 -valid output - -Arg value 101234567000 - -Warning: posix_getpwuid() expects parameter 1 to be int, float given in %s on line %d -valid output - -Arg value 1.07654321E-9 -valid output - -Arg value 0.5 -valid output - -Notice: Array to string conversion in %sposix_getpwuid_variation.php on line %d - -Arg value Array - -Warning: posix_getpwuid() expects parameter 1 to be int, array given in %s on line %d -valid output - -Notice: Array to string conversion in %sposix_getpwuid_variation.php on line %d - -Arg value Array - -Warning: posix_getpwuid() expects parameter 1 to be int, array given in %s on line %d -valid output - -Notice: Array to string conversion in %sposix_getpwuid_variation.php on line %d - -Arg value Array - -Warning: posix_getpwuid() expects parameter 1 to be int, array given in %s on line %d -valid output - -Notice: Array to string conversion in %sposix_getpwuid_variation.php on line %d - -Arg value Array - -Warning: posix_getpwuid() expects parameter 1 to be int, array given in %s on line %d -valid output - -Notice: Array to string conversion in %sposix_getpwuid_variation.php on line %d - -Arg value Array - -Warning: posix_getpwuid() expects parameter 1 to be int, array given in %s on line %d -valid output - -Arg value -valid output - -Arg value -valid output - -Arg value 1 -valid output - -Arg value -valid output - -Arg value 1 -valid output - -Arg value -valid output - -Arg value - -Warning: posix_getpwuid() expects parameter 1 to be int, string given in %s on line %d -valid output - -Arg value - -Warning: posix_getpwuid() expects parameter 1 to be int, string given in %s on line %d -valid output - -Arg value string - -Warning: posix_getpwuid() expects parameter 1 to be int, string given in %s on line %d -valid output - -Arg value string - -Warning: posix_getpwuid() expects parameter 1 to be int, string given in %s on line %d -valid output - -Arg value -valid output - -Arg value -valid output - -Recoverable fatal error: Object of class stdClass could not be converted to string in %s on line %d diff --git a/ext/posix/tests/posix_kill_variation1.phpt b/ext/posix/tests/posix_kill_variation1.phpt deleted file mode 100644 index 25a123cf04..0000000000 --- a/ext/posix/tests/posix_kill_variation1.phpt +++ /dev/null @@ -1,182 +0,0 @@ ---TEST-- -Test posix_kill() function : usage variations - first parameter type ---SKIPIF-- -<?php - PHP_INT_SIZE == 4 or die("skip - 32-bit only"); - if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; -?> ---FILE-- -<?php -/* Prototype : proto bool posix_kill(int pid, int sig) - * Description: Send a signal to a process (POSIX.1, 3.3.2) - * Source code: ext/posix/posix.c - * Alias to functions: - */ - -echo "*** Testing posix_kill() : usage variations ***\n"; - -// Initialise function arguments not being substituted (if any) -$sig = -999; - -//get an unset variable -$unset_var = 10; -unset ($unset_var); - -//array of values to iterate over -$values = array( - - // float data - 10.5, - -10.5, - 10.1234567e10, - 10.7654321E-10, - .5, - - // array data - array(), - array(0), - array(1), - array(1, 2), - array('color' => 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // undefined data - $undefined_var, - - // unset data - $unset_var, - - // object data - new stdclass(), -); - -// loop through each element of the array for pid - -foreach($values as $value) { - echo "\nArg value $value \n"; - var_dump( posix_kill($value, $sig) ); -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing posix_kill() : usage variations *** - -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d - -Arg value 10.5 -bool(false) - -Arg value -10.5 -bool(false) - -Arg value 101234567000 - -Warning: posix_kill() expects parameter 1 to be int, float given in %s on line %d -bool(false) - -Arg value 1.07654321E-9 -bool(false) - -Arg value 0.5 -bool(false) - -Notice: Array to string conversion in %sposix_kill_variation1.php on line %d - -Arg value Array - -Warning: posix_kill() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Notice: Array to string conversion in %sposix_kill_variation1.php on line %d - -Arg value Array - -Warning: posix_kill() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Notice: Array to string conversion in %sposix_kill_variation1.php on line %d - -Arg value Array - -Warning: posix_kill() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Notice: Array to string conversion in %sposix_kill_variation1.php on line %d - -Arg value Array - -Warning: posix_kill() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Notice: Array to string conversion in %sposix_kill_variation1.php on line %d - -Arg value Array - -Warning: posix_kill() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Arg value -bool(false) - -Arg value -bool(false) - -Arg value 1 -bool(false) - -Arg value -bool(false) - -Arg value 1 -bool(false) - -Arg value -bool(false) - -Arg value - -Warning: posix_kill() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Arg value - -Warning: posix_kill() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Arg value string - -Warning: posix_kill() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Arg value string - -Warning: posix_kill() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Arg value -bool(false) - -Arg value -bool(false) - -Recoverable fatal error: Object of class stdClass could not be converted to string in %s on line %d diff --git a/ext/posix/tests/posix_kill_variation2.phpt b/ext/posix/tests/posix_kill_variation2.phpt deleted file mode 100644 index 8ca0d9f3c2..0000000000 --- a/ext/posix/tests/posix_kill_variation2.phpt +++ /dev/null @@ -1,182 +0,0 @@ ---TEST-- -Test posix_kill() function : usage variations - second parameter type ---SKIPIF-- -<?php - PHP_INT_SIZE == 4 or die("skip - 32-bit only"); - if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; -?> ---FILE-- -<?php -/* Prototype : proto bool posix_kill(int pid, int sig) - * Description: Send a signal to a process (POSIX.1, 3.3.2) - * Source code: ext/posix/posix.c - * Alias to functions: - */ - -echo "*** Testing posix_kill() : usage variations ***\n"; - -// Initialise function arguments not being substituted (if any) -$pid = -999; - -//get an unset variable -$unset_var = 10; -unset ($unset_var); - -//array of values to iterate over -$values = array( - - // float data - 10.5, - -10.5, - 10.1234567e10, - 10.7654321E-10, - .5, - - // array data - array(), - array(0), - array(1), - array(1, 2), - array('color' => 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // undefined data - $undefined_var, - - // unset data - $unset_var, - - // object data - new stdclass(), -); - -// loop through each element of the array for sig - -foreach($values as $value) { - echo "\nArg value $value \n"; - var_dump( posix_kill($pid, $value) ); -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing posix_kill() : usage variations *** - -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d - -Arg value 10.5 -bool(false) - -Arg value -10.5 -bool(false) - -Arg value 101234567000 - -Warning: posix_kill() expects parameter 2 to be int, float given in %s on line %d -bool(false) - -Arg value 1.07654321E-9 -bool(false) - -Arg value 0.5 -bool(false) - -Notice: Array to string conversion in %sposix_kill_variation2.php on line %d - -Arg value Array - -Warning: posix_kill() expects parameter 2 to be int, array given in %s on line %d -bool(false) - -Notice: Array to string conversion in %sposix_kill_variation2.php on line %d - -Arg value Array - -Warning: posix_kill() expects parameter 2 to be int, array given in %s on line %d -bool(false) - -Notice: Array to string conversion in %sposix_kill_variation2.php on line %d - -Arg value Array - -Warning: posix_kill() expects parameter 2 to be int, array given in %s on line %d -bool(false) - -Notice: Array to string conversion in %sposix_kill_variation2.php on line %d - -Arg value Array - -Warning: posix_kill() expects parameter 2 to be int, array given in %s on line %d -bool(false) - -Notice: Array to string conversion in %sposix_kill_variation2.php on line %d - -Arg value Array - -Warning: posix_kill() expects parameter 2 to be int, array given in %s on line %d -bool(false) - -Arg value -bool(false) - -Arg value -bool(false) - -Arg value 1 -bool(false) - -Arg value -bool(false) - -Arg value 1 -bool(false) - -Arg value -bool(false) - -Arg value - -Warning: posix_kill() expects parameter 2 to be int, string given in %s on line %d -bool(false) - -Arg value - -Warning: posix_kill() expects parameter 2 to be int, string given in %s on line %d -bool(false) - -Arg value string - -Warning: posix_kill() expects parameter 2 to be int, string given in %s on line %d -bool(false) - -Arg value string - -Warning: posix_kill() expects parameter 2 to be int, string given in %s on line %d -bool(false) - -Arg value -bool(false) - -Arg value -bool(false) - -Recoverable fatal error: Object of class stdClass could not be converted to string in %s on line %d diff --git a/ext/posix/tests/posix_seteuid_variation3.phpt b/ext/posix/tests/posix_seteuid_variation3.phpt deleted file mode 100644 index d4c16514e3..0000000000 --- a/ext/posix/tests/posix_seteuid_variation3.phpt +++ /dev/null @@ -1,48 +0,0 @@ ---TEST-- -Test function posix_seteuid() by substituting argument 1 with emptyUnsetUndefNull values. ---SKIPIF-- -<?php - 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 emptyUnsetUndefNull values ***\n"; - - - -$unset_var = 10; -unset($unset_var); - -$variation_array = array( - 'unset var' => @$unset_var, - 'undefined var' => @$undefined_var, - 'empty string DQ' => "", - 'empty string SQ' => '', - 'uppercase NULL' => NULL, - 'lowercase null' => null, - ); - - -foreach ( $variation_array as $var ) { - var_dump(posix_seteuid( $var ) ); -} -?> ---EXPECTF-- -*** Test substituting argument 1 with emptyUnsetUndefNull values *** -bool(false) -bool(false) - -Warning: posix_seteuid() expects parameter 1 to be int, string given in %s on line 22 -bool(false) - -Warning: posix_seteuid() expects parameter 1 to be int, string given in %s on line 22 -bool(false) -bool(false) -bool(false) diff --git a/ext/posix/tests/posix_setgid_variation3.phpt b/ext/posix/tests/posix_setgid_variation3.phpt deleted file mode 100644 index 92580c9373..0000000000 --- a/ext/posix/tests/posix_setgid_variation3.phpt +++ /dev/null @@ -1,48 +0,0 @@ ---TEST-- -Test function posix_setgid() by substituting argument 1 with emptyUnsetUndefNull values. ---CREDITS-- -Marco Fabbri mrfabbri@gmail.com -Francesco Fullone ff@ideato.it -#PHPTestFest Cesena Italia on 2009-06-20 ---SKIPIF-- -<?php - if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; - if(posix_geteuid() == 0) print "skip - Cannot run test as root."; -?> ---FILE-- -<?php - - -echo "*** Test substituting argument 1 with emptyUnsetUndefNull values ***\n"; - - - -$unset_var = 10; -unset($unset_var); - -$variation_array = array( - 'unset var' => @$unset_var, - 'undefined var' => @$undefined_var, - 'empty string DQ' => "", - 'empty string SQ' => '', - 'uppercase NULL' => NULL, - 'lowercase null' => null, - ); - - -foreach ( $variation_array as $var ) { - var_dump(posix_setgid( $var ) ); -} -?> ---EXPECTF-- -*** Test substituting argument 1 with emptyUnsetUndefNull values *** -bool(false) -bool(false) - -Warning: posix_setgid() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: posix_setgid() expects parameter 1 to be int, string given in %s on line %d -bool(false) -bool(false) -bool(false) diff --git a/ext/posix/tests/posix_setuid_variation3.phpt b/ext/posix/tests/posix_setuid_variation3.phpt deleted file mode 100644 index 0336865062..0000000000 --- a/ext/posix/tests/posix_setuid_variation3.phpt +++ /dev/null @@ -1,48 +0,0 @@ ---TEST-- -Test function posix_setuid() by substituting argument 1 with emptyUnsetUndefNull values. ---SKIPIF-- -<?php - 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 emptyUnsetUndefNull values ***\n"; - - - -$unset_var = 10; -unset($unset_var); - -$variation_array = array( - 'unset var' => @$unset_var, - 'undefined var' => @$undefined_var, - 'empty string DQ' => "", - 'empty string SQ' => '', - 'uppercase NULL' => NULL, - 'lowercase null' => null, - ); - - -foreach ( $variation_array as $var ) { - var_dump(posix_setuid( $var ) ); -} -?> ---EXPECTF-- -*** Test substituting argument 1 with emptyUnsetUndefNull values *** -bool(false) -bool(false) - -Warning: posix_setuid() expects parameter 1 to be int, string given in %s on line 22 -bool(false) - -Warning: posix_setuid() expects parameter 1 to be int, string given in %s on line 22 -bool(false) -bool(false) -bool(false) diff --git a/ext/posix/tests/posix_strerror_variation1.phpt b/ext/posix/tests/posix_strerror_variation1.phpt deleted file mode 100644 index e8da057c7f..0000000000 --- a/ext/posix/tests/posix_strerror_variation1.phpt +++ /dev/null @@ -1,181 +0,0 @@ ---TEST-- -Test posix_strerror() function : usage variations ---SKIPIF-- -<?php - PHP_INT_SIZE == 4 or die("skip - 32-bit only"); - if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; -?> ---FILE-- -<?php -/* Prototype : proto string posix_strerror(int errno) - * Description: Retrieve the system error message associated with the given errno. - * Source code: ext/posix/posix.c - * Alias to functions: - */ - -echo "*** Testing posix_strerror() : usage variations ***\n"; - -// Initialise function arguments not being substituted (if any) - -//get an unset variable -$unset_var = 10; -unset ($unset_var); - -//array of values to iterate over -$values = array( - - // float data - 10.5, - -10.5, - 10.1234567e10, - 10.7654321E-10, - .5, - - // array data - array(), - array(0), - array(1), - array(1, 2), - array('color' => 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // undefined data - $undefined_var, - - // unset data - $unset_var, - - // object data - new stdclass(), -); - -// loop through each element of the array for errno - -foreach($values as $value) { - echo "\nArg value $value \n"; - echo gettype( posix_strerror($value) )."\n"; -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing posix_strerror() : usage variations *** - -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d - -Arg value 10.5 -string - -Arg value -10.5 -string - -Arg value 101234567000 - -Warning: posix_strerror() expects parameter 1 to be int, float given in %s on line %d -boolean - -Arg value 1.07654321E-9 -string - -Arg value 0.5 -string - -Notice: Array to string conversion in %sposix_strerror_variation1.php on line %d - -Arg value Array - -Warning: posix_strerror() expects parameter 1 to be int, array given in %s on line %d -boolean - -Notice: Array to string conversion in %sposix_strerror_variation1.php on line %d - -Arg value Array - -Warning: posix_strerror() expects parameter 1 to be int, array given in %s on line %d -boolean - -Notice: Array to string conversion in %sposix_strerror_variation1.php on line %d - -Arg value Array - -Warning: posix_strerror() expects parameter 1 to be int, array given in %s on line %d -boolean - -Notice: Array to string conversion in %sposix_strerror_variation1.php on line %d - -Arg value Array - -Warning: posix_strerror() expects parameter 1 to be int, array given in %s on line %d -boolean - -Notice: Array to string conversion in %sposix_strerror_variation1.php on line %d - -Arg value Array - -Warning: posix_strerror() expects parameter 1 to be int, array given in %s on line %d -boolean - -Arg value -string - -Arg value -string - -Arg value 1 -string - -Arg value -string - -Arg value 1 -string - -Arg value -string - -Arg value - -Warning: posix_strerror() expects parameter 1 to be int, string given in %s on line %d -boolean - -Arg value - -Warning: posix_strerror() expects parameter 1 to be int, string given in %s on line %d -boolean - -Arg value string - -Warning: posix_strerror() expects parameter 1 to be int, string given in %s on line %d -boolean - -Arg value string - -Warning: posix_strerror() expects parameter 1 to be int, string given in %s on line %d -boolean - -Arg value -string - -Arg value -string - -Recoverable fatal error: Object of class stdClass could not be converted to string in %s on line %d |