diff options
-rw-r--r-- | ext/posix/tests/posix_seteuid_error2.phpt | 55 | ||||
-rw-r--r-- | ext/posix/tests/posix_setgid_variation6.phpt | 58 | ||||
-rw-r--r-- | ext/posix/tests/posix_setuid_error2.phpt | 55 | ||||
-rw-r--r-- | ext/standard/tests/file/fstat_variation6.phpt | 46 | ||||
-rw-r--r-- | ext/standard/tests/file/fwrite_variation5.phpt | 172 | ||||
-rw-r--r-- | ext/standard/tests/file/rmdir_variation2.phpt | 240 | ||||
-rw-r--r-- | ext/standard/tests/file/umask_variation3.phpt | 237 | ||||
-rw-r--r-- | ext/standard/tests/general_functions/proc_nice_variation6.phpt | 56 | ||||
-rw-r--r-- | ext/zlib/tests/gzfile_variation13.phpt | 51 | ||||
-rw-r--r-- | ext/zlib/tests/gzfile_variation6.phpt | 49 | ||||
-rw-r--r-- | ext/zlib/tests/readgzfile_variation13.phpt | 51 | ||||
-rw-r--r-- | ext/zlib/tests/readgzfile_variation6.phpt | 49 |
12 files changed, 0 insertions, 1119 deletions
diff --git a/ext/posix/tests/posix_seteuid_error2.phpt b/ext/posix/tests/posix_seteuid_error2.phpt deleted file mode 100644 index b56046d326..0000000000 --- a/ext/posix/tests/posix_seteuid_error2.phpt +++ /dev/null @@ -1,55 +0,0 @@ ---TEST-- -Test function posix_seteuid() by substituting argument 1 with object values. ---SKIPIF-- -<?php - if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; -?> ---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 object values ***\n"; - - - -function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() != 0) { - // report non-silenced errors - echo "Error: $err_no - $err_msg, $filename($linenum)\n"; - } -} -set_error_handler('test_error_handler'); - - - -class classWithToString -{ - public function __toString() { - return "Class A object"; - } -} - -class classWithoutToString -{ -} - -$variation_array = array( - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - ); - - -foreach ( $variation_array as $var ) { - var_dump(posix_seteuid( $var ) ); -} -?> ---EXPECTF-- -*** Test substituting argument 1 with object values *** -Error: 2 - posix_seteuid() expects parameter 1 to be int, object given, %s -bool(false) -Error: 2 - posix_seteuid() expects parameter 1 to be int, object given, %s -bool(false) diff --git a/ext/posix/tests/posix_setgid_variation6.phpt b/ext/posix/tests/posix_setgid_variation6.phpt deleted file mode 100644 index 6be85e7a85..0000000000 --- a/ext/posix/tests/posix_setgid_variation6.phpt +++ /dev/null @@ -1,58 +0,0 @@ ---TEST-- -Test function posix_setgid() by substituting argument 1 with object values. ---SKIPIF-- -<?php - if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; -?> ---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 object values ***\n"; - - - -function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() != 0) { - // report non-silenced errors - echo "Error: $err_no - $err_msg, $filename($linenum)\n"; - } -} -set_error_handler('test_error_handler'); - - - -class classWithToString -{ - public function __toString() { - return "Class A object"; - } -} - -class classWithoutToString -{ -} - -$variation_array = array( - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - ); - - -foreach ( $variation_array as $var ) { - var_dump(posix_setgid( $var ) ); -} -?> -===DONE=== ---EXPECTF-- -*** Test substituting argument 1 with object values *** -Error: 2 - posix_setgid() expects parameter 1 to be int, object given, %s -bool(false) -Error: 2 - posix_setgid() expects parameter 1 to be int, object given, %s -bool(false) -===DONE=== - diff --git a/ext/posix/tests/posix_setuid_error2.phpt b/ext/posix/tests/posix_setuid_error2.phpt deleted file mode 100644 index 7775f09b0c..0000000000 --- a/ext/posix/tests/posix_setuid_error2.phpt +++ /dev/null @@ -1,55 +0,0 @@ ---TEST-- -Test function posix_setuid() by substituting argument 1 with object values. ---SKIPIF-- -<?php - if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; -?> ---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 object values ***\n"; - - - -function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() != 0) { - // report non-silenced errors - echo "Error: $err_no - $err_msg, $filename($linenum)\n"; - } -} -set_error_handler('test_error_handler'); - - - -class classWithToString -{ - public function __toString() { - return "Class A object"; - } -} - -class classWithoutToString -{ -} - -$variation_array = array( - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - ); - - -foreach ( $variation_array as $var ) { - var_dump(posix_setuid( $var ) ); -} -?> ---EXPECTF-- -*** Test substituting argument 1 with object values *** -Error: 2 - posix_setuid() expects parameter 1 to be int, object given, %s -bool(false) -Error: 2 - posix_setuid() expects parameter 1 to be int, object given, %s -bool(false) diff --git a/ext/standard/tests/file/fstat_variation6.phpt b/ext/standard/tests/file/fstat_variation6.phpt deleted file mode 100644 index c720c6f25a..0000000000 --- a/ext/standard/tests/file/fstat_variation6.phpt +++ /dev/null @@ -1,46 +0,0 @@ ---TEST-- -Test function fstat() by substituting argument 1 with object values. ---FILE-- -<?php - - - - -function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() != 0) { - // report non-silenced errors - echo "Error: $err_no - $err_msg, $filename($linenum)\n"; - } -} -set_error_handler('test_error_handler'); - - - -class classWithToString -{ - public function __toString() { - return "Class A object"; - } -} - -class classWithoutToString -{ -} - -$variation_array = array( - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - ); - - -foreach ( $variation_array as $var ) { - var_dump(fstat( $var ) ); -} -?> -===DONE=== ---EXPECTF-- -Error: 2 - fstat() expects parameter 1 to be resource, object given, %s(%d) -bool(false) -Error: 2 - fstat() expects parameter 1 to be resource, object given, %s(%d) -bool(false) -===DONE=== diff --git a/ext/standard/tests/file/fwrite_variation5.phpt b/ext/standard/tests/file/fwrite_variation5.phpt deleted file mode 100644 index ff1214c527..0000000000 --- a/ext/standard/tests/file/fwrite_variation5.phpt +++ /dev/null @@ -1,172 +0,0 @@ ---TEST-- -Test fwrite() function : usage variation ---CREDITS-- -Dave Kelsey <d_kelsey@uk.ibm.com> ---FILE-- -<?php -/* Prototype : int fwrite(resource fp, string str [, int length]) - * Description: Binary-safe file write - * Source code: ext/standard/file.c - * Alias to functions: bzwrite fputs gzwrite - */ - -echo "*** Testing fwrite() : usage variation ***\n"; - -// Define error handler -function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() != 0) { - // report non-silenced errors - echo "Error: $err_no - $err_msg, $filename($linenum)\n"; - } -} -set_error_handler('test_error_handler'); - -// Initialise function arguments not being substituted (if any) - -$filename = __DIR__ . '/fwriteVar5.tmp'; - - - -//get an unset variable -$unset_var = 10; -unset ($unset_var); - -// define some classes -class classWithToString -{ - public function __toString() { - return "Class A object"; - } -} - -class classWithoutToString -{ -} - -// heredoc string -$heredoc = <<<EOT -hello world -EOT; - -// add arrays -$index_array = array (1, 2, 3); -$assoc_array = array ('one' => 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for str - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - $fp = fopen($filename,'w'); - fwrite($fp, $value); - fclose($fp); - readfile($filename); -}; -unlink($filename); - -?> -===DONE=== ---EXPECTF-- -*** Testing fwrite() : usage variation *** - ---int 0-- -0 ---int 1-- -1 ---int 12345-- -12345 ---int -12345-- --2345 ---float 10.5-- -10.5 ---float -10.5-- --10.5 ---float 12.3456789000e10-- -123456789000 ---float -12.3456789000e10-- --123456789000 ---float .5-- -0.5 ---empty array-- -Error: 2 - fwrite() expects parameter 2 to be string, array given, %s(%d) - ---int indexed array-- -Error: 2 - fwrite() expects parameter 2 to be string, array given, %s(%d) - ---associative array-- -Error: 2 - fwrite() expects parameter 2 to be string, array given, %s(%d) - ---nested arrays-- -Error: 2 - fwrite() expects parameter 2 to be string, array given, %s(%d) - ---uppercase NULL-- - ---lowercase null-- - ---lowercase true-- -1 ---lowercase false-- - ---uppercase TRUE-- -1 ---uppercase FALSE-- - ---empty string DQ-- - ---empty string SQ-- - ---instance of classWithToString-- -Class A object ---instance of classWithoutToString-- -Error: 2 - fwrite() expects parameter 2 to be string, object given, %s(%d) - ---undefined var-- - ---unset var-- -===DONE=== diff --git a/ext/standard/tests/file/rmdir_variation2.phpt b/ext/standard/tests/file/rmdir_variation2.phpt deleted file mode 100644 index 7555200344..0000000000 --- a/ext/standard/tests/file/rmdir_variation2.phpt +++ /dev/null @@ -1,240 +0,0 @@ ---TEST-- -Test rmdir() function : usage variation - different types for context ---CREDITS-- -Dave Kelsey <d_kelsey@uk.ibm.com> ---FILE-- -<?php -/* Prototype : bool rmdir(string dirname[, resource context]) - * Description: Remove a directory - * Source code: ext/standard/file.c - * Alias to functions: - */ - -echo "*** Testing rmdir() : usage variation ***\n"; - -// Define error handler -function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() != 0) { - // report non-silenced errors - echo "Error: $err_no - $err_msg, $filename($linenum)\n"; - } -} -set_error_handler('test_error_handler'); - -// Initialise function arguments not being substituted (if any) -$dirname = 'rmdirVar2.tmp'; - -//get an unset variable -$unset_var = 10; -unset ($unset_var); - -// define some classes -class classWithToString -{ - public function __toString() { - return "Class A object"; - } -} - -class classWithoutToString -{ -} - -// heredoc string -$heredoc = <<<EOT -hello world -EOT; - -// add arrays -$index_array = array (1, 2, 3); -$assoc_array = array ('one' => 1, 'two' => 2); - -$fileres = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // non stream context resource - $fileres, -); - -// loop through each element of the array for context - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - @mkdir($dirname); - var_dump( rmdir($dirname, $value) ); -}; - -@rmdir($dirname); -fclose($fileres); -?> -===DONE=== ---EXPECTF-- -*** Testing rmdir() : usage variation *** - ---int 0-- -Error: 2 - rmdir() expects parameter 2 to be resource, int given, %s(%d) -bool(false) - ---int 1-- -Error: 2 - rmdir() expects parameter 2 to be resource, int given, %s(%d) -bool(false) - ---int 12345-- -Error: 2 - rmdir() expects parameter 2 to be resource, int given, %s(%d) -bool(false) - ---int -12345-- -Error: 2 - rmdir() expects parameter 2 to be resource, int given, %s(%d) -bool(false) - ---float 10.5-- -Error: 2 - rmdir() expects parameter 2 to be resource, float given, %s(%d) -bool(false) - ---float -10.5-- -Error: 2 - rmdir() expects parameter 2 to be resource, float given, %s(%d) -bool(false) - ---float 12.3456789000e10-- -Error: 2 - rmdir() expects parameter 2 to be resource, float given, %s(%d) -bool(false) - ---float -12.3456789000e10-- -Error: 2 - rmdir() expects parameter 2 to be resource, float given, %s(%d) -bool(false) - ---float .5-- -Error: 2 - rmdir() expects parameter 2 to be resource, float given, %s(%d) -bool(false) - ---empty array-- -Error: 2 - rmdir() expects parameter 2 to be resource, array given, %s(%d) -bool(false) - ---int indexed array-- -Error: 2 - rmdir() expects parameter 2 to be resource, array given, %s(%d) -bool(false) - ---associative array-- -Error: 2 - rmdir() expects parameter 2 to be resource, array given, %s(%d) -bool(false) - ---nested arrays-- -Error: 2 - rmdir() expects parameter 2 to be resource, array given, %s(%d) -bool(false) - ---uppercase NULL-- -bool(true) - ---lowercase null-- -bool(true) - ---lowercase true-- -Error: 2 - rmdir() expects parameter 2 to be resource, bool given, %s(%d) -bool(false) - ---lowercase false-- -Error: 2 - rmdir() expects parameter 2 to be resource, bool given, %s(%d) -bool(false) - ---uppercase TRUE-- -Error: 2 - rmdir() expects parameter 2 to be resource, bool given, %s(%d) -bool(false) - ---uppercase FALSE-- -Error: 2 - rmdir() expects parameter 2 to be resource, bool given, %s(%d) -bool(false) - ---empty string DQ-- -Error: 2 - rmdir() expects parameter 2 to be resource, string given, %s(%d) -bool(false) - ---empty string SQ-- -Error: 2 - rmdir() expects parameter 2 to be resource, string given, %s(%d) -bool(false) - ---string DQ-- -Error: 2 - rmdir() expects parameter 2 to be resource, string given, %s(%d) -bool(false) - ---string SQ-- -Error: 2 - rmdir() expects parameter 2 to be resource, string given, %s(%d) -bool(false) - ---mixed case string-- -Error: 2 - rmdir() expects parameter 2 to be resource, string given, %s(%d) -bool(false) - ---heredoc-- -Error: 2 - rmdir() expects parameter 2 to be resource, string given, %s(%d) -bool(false) - ---instance of classWithToString-- -Error: 2 - rmdir() expects parameter 2 to be resource, object given, %s(%d) -bool(false) - ---instance of classWithoutToString-- -Error: 2 - rmdir() expects parameter 2 to be resource, object given, %s(%d) -bool(false) - ---undefined var-- -bool(true) - ---unset var-- -bool(true) - ---0-- -Error: 2 - rmdir(): supplied resource is not a valid Stream-Context resource, %s(%d) -bool(true) -===DONE=== diff --git a/ext/standard/tests/file/umask_variation3.phpt b/ext/standard/tests/file/umask_variation3.phpt deleted file mode 100644 index 68996ab692..0000000000 --- a/ext/standard/tests/file/umask_variation3.phpt +++ /dev/null @@ -1,237 +0,0 @@ ---TEST-- -Test umask() function : usage variation ---CREDITS-- -Dave Kelsey <d_kelsey@uk.ibm.com> ---SKIPIF-- -<?php -if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only"); -if (substr(PHP_OS, 0, 3) == 'WIN') { - die('skip.. only for Non Windows'); -} -?> ---FILE-- -<?php -/* Prototype : int umask([int mask]) - * Description: Return or change the umask - * Source code: ext/standard/file.c - * Alias to functions: - */ - -echo "*** Testing umask() : usage variation ***\n"; - -// Define error handler -function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() != 0) { - // report non-silenced errors - echo "Error: $err_no - $err_msg, $filename($linenum)\n"; - } -} -set_error_handler('test_error_handler'); - -// Initialise function arguments not being substituted (if any) - -//get an unset variable -$unset_var = 10; -unset ($unset_var); - -// define some classes -class classWithToString -{ - public function __toString() { - return "Class A object"; - } -} - -class classWithoutToString -{ -} - -// heredoc string -$heredoc = <<<EOT -hello world -EOT; - -// add arrays -$index_array = array (1, 2, 3); -$assoc_array = array ('one' => 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - //out of boundary integers - 'int -100' => -100, - 'int 99999' => 99999, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - //'float -12.3456789000e10' => -12.3456789000e10, different in p8 - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for mask - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - umask(0); - var_dump(umask($value)); - var_dump( umask() & 0777); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing umask() : usage variation *** - ---int -100-- -int(0) -int(412) - ---int 99999-- -int(0) -int(159) - ---float 10.5-- -int(0) -int(10) - ---float -10.5-- -int(0) -int(502) - ---float 12.3456789000e10-- -int(0) -int(%d) - ---float .5-- -int(0) -int(0) - ---empty array-- -Error: 2 - umask() expects parameter 1 to be int, array given, %s(%d) -bool(false) -int(63) - ---int indexed array-- -Error: 2 - umask() expects parameter 1 to be int, array given, %s(%d) -bool(false) -int(63) - ---associative array-- -Error: 2 - umask() expects parameter 1 to be int, array given, %s(%d) -bool(false) -int(63) - ---nested arrays-- -Error: 2 - umask() expects parameter 1 to be int, array given, %s(%d) -bool(false) -int(63) - ---uppercase NULL-- -int(0) -int(0) - ---lowercase null-- -int(0) -int(0) - ---lowercase true-- -int(0) -int(1) - ---lowercase false-- -int(0) -int(0) - ---uppercase TRUE-- -int(0) -int(1) - ---uppercase FALSE-- -int(0) -int(0) - ---empty string DQ-- -Error: 2 - umask() expects parameter 1 to be int, string given, %s(%d) -bool(false) -int(63) - ---empty string SQ-- -Error: 2 - umask() expects parameter 1 to be int, string given, %s(%d) -bool(false) -int(63) - ---string DQ-- -Error: 2 - umask() expects parameter 1 to be int, string given, %s(%d) -bool(false) -int(63) - ---string SQ-- -Error: 2 - umask() expects parameter 1 to be int, string given, %s(%d) -bool(false) -int(63) - ---mixed case string-- -Error: 2 - umask() expects parameter 1 to be int, string given, %s(%d) -bool(false) -int(63) - ---heredoc-- -Error: 2 - umask() expects parameter 1 to be int, string given, %s(%d) -bool(false) -int(63) - ---instance of classWithToString-- -Error: 2 - umask() expects parameter 1 to be int, object given, %s(%d) -bool(false) -int(63) - ---instance of classWithoutToString-- -Error: 2 - umask() expects parameter 1 to be int, object given, %s(%d) -bool(false) -int(63) - ---undefined var-- -int(0) -int(0) - ---unset var-- -int(0) -int(0) -===DONE=== diff --git a/ext/standard/tests/general_functions/proc_nice_variation6.phpt b/ext/standard/tests/general_functions/proc_nice_variation6.phpt deleted file mode 100644 index a3aff167ed..0000000000 --- a/ext/standard/tests/general_functions/proc_nice_variation6.phpt +++ /dev/null @@ -1,56 +0,0 @@ ---TEST-- -Test function proc_nice() by substituting argument 1 with object values. ---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) ---SKIPIF-- -<?php -if(!function_exists('proc_nice')) die("skip. proc_nice not available "); -?> ---FILE-- -<?php - - -echo "*** Test substituting argument 1 with object values ***\n"; - - - -function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() != 0) { - // report non-silenced errors - echo "Error: $err_no - $err_msg, $filename($linenum)\n"; - } -} -set_error_handler('test_error_handler'); - - - -class classWithToString -{ - public function __toString() { - return "Class A object"; - } -} - -class classWithoutToString -{ -} - -$variation_array = array( - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - ); - - -foreach ( $variation_array as $var ) { - var_dump(proc_nice( $var ) ); -} -?> ---EXPECTF-- -*** Test substituting argument 1 with object values *** -Error: 2 - proc_nice() expects parameter 1 to be int, object given, %s(%d) -bool(false) -Error: 2 - proc_nice() expects parameter 1 to be int, object given, %s(%d) -bool(false) diff --git a/ext/zlib/tests/gzfile_variation13.phpt b/ext/zlib/tests/gzfile_variation13.phpt deleted file mode 100644 index 2920fc108c..0000000000 --- a/ext/zlib/tests/gzfile_variation13.phpt +++ /dev/null @@ -1,51 +0,0 @@ ---TEST-- -Test function gzfile() by substituting argument 2 with object values. ---SKIPIF-- -<?php -if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); -?> ---FILE-- -<?php - - -$filename = $filename = dirname(__FILE__)."/004.txt.gz"; - - -function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() != 0) { - // report non-silenced errors - echo "Error: $err_no - $err_msg, $filename($linenum)\n"; - } -} -set_error_handler('test_error_handler'); - - - -class classWithToString -{ - public function __toString() { - return "Class A object"; - } -} - -class classWithoutToString -{ -} - -$variation = array( - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - ); - - -foreach ( $variation as $var ) { - var_dump(gzfile( $filename, $var ) ); -} -?> -===DONE=== ---EXPECTF-- -Error: 2 - gzfile() expects parameter 2 to be int, object given, %s(%d) -NULL -Error: 2 - gzfile() expects parameter 2 to be int, object given, %s(%d) -NULL -===DONE=== diff --git a/ext/zlib/tests/gzfile_variation6.phpt b/ext/zlib/tests/gzfile_variation6.phpt deleted file mode 100644 index 64168180fc..0000000000 --- a/ext/zlib/tests/gzfile_variation6.phpt +++ /dev/null @@ -1,49 +0,0 @@ ---TEST-- -Test function gzfile() by substituting argument 1 with object values. ---SKIPIF-- -<?php -if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); -?> ---FILE-- -<?php - - -$use_include_path = false; - - -function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() != 0) { - // report non-silenced errors - echo "Error: $err_no - $err_msg, $filename($linenum)\n"; - } -} -set_error_handler('test_error_handler'); - - - -class classWithToString -{ - public function __toString() { - return "Class A object"; - } -} - -class classWithoutToString -{ -} - -$variation = array( - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - ); - - -foreach ( $variation as $var ) { - var_dump(gzfile( $var , $use_include_path ) ); -} -?> ---EXPECTF-- -Error: 2 - gzfile(Class A object): failed to open stream: No such file or directory, %s(%d) -bool(false) -Error: 2 - gzfile() expects parameter 1 to be a valid path, object given, %s(%d) -NULL diff --git a/ext/zlib/tests/readgzfile_variation13.phpt b/ext/zlib/tests/readgzfile_variation13.phpt deleted file mode 100644 index 718d6935fa..0000000000 --- a/ext/zlib/tests/readgzfile_variation13.phpt +++ /dev/null @@ -1,51 +0,0 @@ ---TEST-- -Test function readgzfile() by substituting argument 2 with object values. ---SKIPIF-- -<?php -if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); -?> ---FILE-- -<?php - - -$filename = $filename = dirname(__FILE__)."/004.txt.gz"; - - -function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() != 0) { - // report non-silenced errors - echo "Error: $err_no - $err_msg, $filename($linenum)\n"; - } -} -set_error_handler('test_error_handler'); - - - -class classWithToString -{ - public function __toString() { - return "Class A object"; - } -} - -class classWithoutToString -{ -} - -$variation = array( - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - ); - - -foreach ( $variation as $var ) { - var_dump(readgzfile( $filename, $var ) ); -} -?> -===DONE=== ---EXPECTF-- -Error: 2 - readgzfile() expects parameter 2 to be int, object given, %s(%d) -NULL -Error: 2 - readgzfile() expects parameter 2 to be int, object given, %s(%d) -NULL -===DONE=== diff --git a/ext/zlib/tests/readgzfile_variation6.phpt b/ext/zlib/tests/readgzfile_variation6.phpt deleted file mode 100644 index 9fcea02939..0000000000 --- a/ext/zlib/tests/readgzfile_variation6.phpt +++ /dev/null @@ -1,49 +0,0 @@ ---TEST-- -Test function readgzfile() by substituting argument 1 with object values. ---SKIPIF-- -<?php -if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); -?> ---FILE-- -<?php - - -$use_include_path = false; - - -function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() != 0) { - // report non-silenced errors - echo "Error: $err_no - $err_msg, $filename($linenum)\n"; - } -} -set_error_handler('test_error_handler'); - - - -class classWithToString -{ - public function __toString() { - return "Class A object"; - } -} - -class classWithoutToString -{ -} - -$variation = array( - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - ); - - -foreach ( $variation as $var ) { - var_dump(readgzfile( $var , $use_include_path ) ); -} -?> ---EXPECTF-- -Error: 2 - readgzfile(Class A object): failed to open stream: No such file or directory, %s(%d) -bool(false) -Error: 2 - readgzfile() expects parameter 1 to be a valid path, object given, %s(%d) -NULL |