diff options
64 files changed, 0 insertions, 2035 deletions
diff --git a/ext/hash/tests/hash_copy_002.phpt b/ext/hash/tests/hash_copy_002.phpt deleted file mode 100644 index 0528bb5a98..0000000000 --- a/ext/hash/tests/hash_copy_002.phpt +++ /dev/null @@ -1,21 +0,0 @@ ---TEST-- -Hash: hash_copy() errors ---FILE-- -<?php - -$r = hash_init("md5"); -var_dump(hash_copy()); -var_dump(hash_copy($r)); -var_dump(hash_copy($r, $r)); - -echo "Done\n"; -?> ---EXPECTF-- -Warning: hash_copy() expects exactly 1 parameter, 0 given in %s on line %d -NULL -object(HashContext)#%d (0) { -} - -Warning: hash_copy() expects exactly 1 parameter, 2 given in %s on line %d -NULL -Done diff --git a/ext/iconv/tests/iconv_strlen_error1.phpt b/ext/iconv/tests/iconv_strlen_error1.phpt deleted file mode 100644 index 21b99c011d..0000000000 --- a/ext/iconv/tests/iconv_strlen_error1.phpt +++ /dev/null @@ -1,45 +0,0 @@ ---TEST-- -Test iconv_strlen() function : error conditions - pass incorrect number of args ---SKIPIF-- -<?php -extension_loaded('iconv') or die('skip'); -function_exists('iconv_strlen') or die("skip iconv_strlen() is not available in this build"); -?> ---FILE-- -<?php -/* Prototype : int iconv_strlen(string str [, string charset]) - * Description: Get character numbers of a string - * Source code: ext/iconv/iconv.c - */ - -/* - * Pass iconv_strlen an incorrect number of arguments to test behaviour - */ - -echo "*** Testing iconv_strlen() : error conditions ***\n"; - -// Zero arguments -echo "\n-- Testing iconv_strlen() function with Zero arguments --\n"; -var_dump( iconv_strlen() ); - -//Test iconv_strlen with one more than the expected number of arguments -echo "\n-- Testing iconv_strlen() function with more than expected no. of arguments --\n"; -$str = 'string_val'; -$encoding = 'string_val'; -$extra_arg = 10; -var_dump( iconv_strlen($str, $encoding, $extra_arg) ); -?> -===DONE=== ---EXPECTF-- -*** Testing iconv_strlen() : error conditions *** - --- Testing iconv_strlen() function with Zero arguments -- - -Warning: iconv_strlen() expects at least 1 parameter, 0 given in %s on line %d -bool(false) - --- Testing iconv_strlen() function with more than expected no. of arguments -- - -Warning: iconv_strlen() expects at most 2 parameters, 3 given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/iconv/tests/iconv_strpos_error1.phpt b/ext/iconv/tests/iconv_strpos_error1.phpt deleted file mode 100644 index dd0fe466d7..0000000000 --- a/ext/iconv/tests/iconv_strpos_error1.phpt +++ /dev/null @@ -1,50 +0,0 @@ ---TEST-- -Test iconv_strpos() function : error conditions - Pass incorrect number of args ---SKIPIF-- -<?php -extension_loaded('iconv') or die('skip'); -function_exists('iconv_strpos') or die("skip iconv_strpos() is not available in this build"); -?> ---FILE-- -<?php -/* Prototype : int iconv_strpos(string haystack, string needle [, int offset [, string charset]]) - * Description: Find position of first occurrence of a string within another - * Source code: ext/iconv/iconv.c - */ - -/* - * Test how iconv_strpos behaves when passed an incorrect number of arguments - */ - -echo "*** Testing iconv_strpos() : error conditions ***\n"; - - -//Test iconv_strpos with one more than the expected number of arguments -echo "\n-- Testing iconv_strpos() function with more than expected no. of arguments --\n"; -$haystack = 'string_val'; -$needle = 'string_val'; -$offset = 10; -$encoding = 'string_val'; -$extra_arg = 10; -var_dump( iconv_strpos($haystack, $needle, $offset, $encoding, $extra_arg) ); - -// Testing iconv_strpos with one less than the expected number of arguments -echo "\n-- Testing iconv_strpos() function with less than expected no. of arguments --\n"; -$haystack = 'string_val'; -var_dump( iconv_strpos($haystack) ); - -echo "Done"; -?> ---EXPECTF-- -*** Testing iconv_strpos() : error conditions *** - --- Testing iconv_strpos() function with more than expected no. of arguments -- - -Warning: iconv_strpos() expects at most 4 parameters, 5 given in %s on line %d -bool(false) - --- Testing iconv_strpos() function with less than expected no. of arguments -- - -Warning: iconv_strpos() expects at least 2 parameters, 1 given in %s on line %d -bool(false) -Done diff --git a/ext/iconv/tests/iconv_strrpos_error1.phpt b/ext/iconv/tests/iconv_strrpos_error1.phpt deleted file mode 100644 index 7068f0fffe..0000000000 --- a/ext/iconv/tests/iconv_strrpos_error1.phpt +++ /dev/null @@ -1,49 +0,0 @@ ---TEST-- -Test iconv_strrpos() function : error conditions - pass incorrect number of args ---SKIPIF-- -<?php -extension_loaded('iconv') or die('skip'); -function_exists('iconv_strrpos') or die("skip iconv_strrpos() is not available in this build"); -?> ---FILE-- -<?php -/* Prototype : proto int iconv_strrpos(string haystack, string needle [, string charset]) - * Description: Find position of last occurrence of a string within another - * Source code: ext/iconv/iconv.c - */ - -/* - * Pass iconv_strrpos() an incorrect number of arguments - */ - -echo "*** Testing iconv_strrpos() : error conditions ***\n"; - - -//Test iconv_strrpos with one more than the expected number of arguments -echo "\n-- Testing iconv_strrpos() function with more than expected no. of arguments --\n"; -$haystack = 'string_val'; -$needle = 'string_val'; -$encoding = 'string_val'; -$extra_arg = 10; -var_dump( iconv_strrpos($haystack, $needle, $encoding, $extra_arg) ); - -// Testing iconv_strrpos with one less than the expected number of arguments -echo "\n-- Testing iconv_strrpos() function with less than expected no. of arguments --\n"; -$haystack = 'string_val'; -var_dump( iconv_strrpos($haystack) ); - -echo "Done"; -?> ---EXPECTF-- -*** Testing iconv_strrpos() : error conditions *** - --- Testing iconv_strrpos() function with more than expected no. of arguments -- - -Warning: iconv_strrpos() expects at most 3 parameters, 4 given in %s on line %d -bool(false) - --- Testing iconv_strrpos() function with less than expected no. of arguments -- - -Warning: iconv_strrpos() expects at least 2 parameters, 1 given in %s on line %d -bool(false) -Done diff --git a/ext/iconv/tests/iconv_substr_error1.phpt b/ext/iconv/tests/iconv_substr_error1.phpt deleted file mode 100644 index e0c277b59c..0000000000 --- a/ext/iconv/tests/iconv_substr_error1.phpt +++ /dev/null @@ -1,49 +0,0 @@ ---TEST-- -Test iconv_substr() function : error conditions - Pass incorrect number of args ---SKIPIF-- -<?php -extension_loaded('iconv') or die('skip'); -function_exists('iconv_substr') or die("skip iconv_substr() is not available in this build"); -?> ---FILE-- -<?php -/* Prototype : string iconv_substr(string str, int offset, [int length, string charset]) - * Description: Returns part of a string - * Source code: ext/iconv/iconv.c - */ - -/* - * Pass incorrect number of arguments to iconv_substr() to test behaviour - */ - -echo "*** Testing iconv_substr() : error conditions ***\n"; - -//Test iconv_substr with one more than the expected number of arguments -echo "\n-- Testing iconv_substr() function with more than expected no. of arguments --\n"; -$str = 'string_val'; -$start = 10; -$length = 10; -$encoding = 'string_val'; -$extra_arg = 10; -var_dump( iconv_substr($str, $start, $length, $encoding, $extra_arg) ); - -// Testing iconv_substr with one less than the expected number of arguments -echo "\n-- Testing iconv_substr() function with less than expected no. of arguments --\n"; -$str = 'string_val'; -var_dump( iconv_substr($str) ); - -echo "Done"; -?> ---EXPECTF-- -*** Testing iconv_substr() : error conditions *** - --- Testing iconv_substr() function with more than expected no. of arguments -- - -Warning: iconv_substr() expects at most 4 parameters, 5 given in %s on line %d -bool(false) - --- Testing iconv_substr() function with less than expected no. of arguments -- - -Warning: iconv_substr() expects at least 2 parameters, 1 given in %s on line %d -bool(false) -Done diff --git a/ext/pcre/tests/preg_grep_error.phpt b/ext/pcre/tests/preg_grep_error.phpt deleted file mode 100644 index 8cc3ffe669..0000000000 --- a/ext/pcre/tests/preg_grep_error.phpt +++ /dev/null @@ -1,43 +0,0 @@ ---TEST-- -Test preg_grep() function : error conditions - wrong numbers of parameters ---FILE-- -<?php -/* -* proto array preg_grep(string regex, array input [, int flags]) -* Function is implemented in ext/pcre/php_pcre.c -*/ -echo "*** Testing preg_grep() : error conditions ***\n"; -// Zero arguments -echo "\n-- Testing preg_grep() function with Zero arguments --\n"; -var_dump(preg_grep()); -//Test preg_grep with one more than the expected number of arguments -echo "\n-- Testing preg_grep() function with more than expected no. of arguments --\n"; -$regex = '/\d/'; -$input = array(1, 2); -$flags = 0; -$extra_arg = 10; -var_dump(preg_grep($regex, $input, $flags, $extra_arg)); -// Testing preg_grep withone less than the expected number of arguments -echo "\n-- Testing preg_grep() function with less than expected no. of arguments --\n"; -$regex = 'string_val'; -var_dump(preg_grep($regex)); -echo "Done" -?> ---EXPECTF-- -*** Testing preg_grep() : error conditions *** - --- Testing preg_grep() function with Zero arguments -- - -Warning: preg_grep() expects at least 2 parameters, 0 given in %spreg_grep_error.php on line %d -NULL - --- Testing preg_grep() function with more than expected no. of arguments -- - -Warning: preg_grep() expects at most 3 parameters, 4 given in %spreg_grep_error.php on line %d -NULL - --- Testing preg_grep() function with less than expected no. of arguments -- - -Warning: preg_grep() expects at least 2 parameters, 1 given in %spreg_grep_error.php on line %d -NULL -Done diff --git a/ext/pcre/tests/preg_grep_error2.phpt b/ext/pcre/tests/preg_grep_error2.phpt deleted file mode 100644 index 720940800f..0000000000 --- a/ext/pcre/tests/preg_grep_error2.phpt +++ /dev/null @@ -1,42 +0,0 @@ ---TEST-- -Test preg_grep() function : error conditions - wrong arg types ---FILE-- -<?php -/* -* proto array preg_grep(string regex, array input [, int flags]) -* Function is implemented in ext/pcre/php_pcre.c -*/ -error_reporting(E_ALL&~E_NOTICE); -/* -* Testing how preg_grep reacts to being passed the wrong type of input argument -*/ -echo "*** Testing preg_grep() : error conditions ***\n"; -$regex = '/[a-zA-Z]/'; -$input = array('this is a string', array('this is', 'a subarray'),); -foreach($input as $value) { - print "\nArg value is: $value\n"; - var_dump(preg_grep($regex, $value)); -} -$value = new stdclass(); //Object -var_dump(preg_grep($regex, $value)); -echo "Done"; -?> ---EXPECTF-- -*** Testing preg_grep() : error conditions *** - -Arg value is: this is a string - -Warning: preg_grep() expects parameter 2 to be array, string given in %spreg_grep_error2.php on line %d -NULL - -Arg value is: Array -array(2) { - [0]=> - string(7) "this is" - [1]=> - string(10) "a subarray" -} - -Warning: preg_grep() expects parameter 2 to be array, object given in %spreg_grep_error2.php on line %d -NULL -Done diff --git a/ext/pcre/tests/preg_last_error_error.phpt b/ext/pcre/tests/preg_last_error_error.phpt deleted file mode 100644 index 105d5ab1c2..0000000000 --- a/ext/pcre/tests/preg_last_error_error.phpt +++ /dev/null @@ -1,30 +0,0 @@ ---TEST-- -Test preg_grep() function : error conditions - wrong numbers of parameters ---FILE-- -<?php - -/* Prototype : int preg_last_error ( void ) - * Description: Returns the error code of the last PCRE regex execution - * Source code: ext/pcre/php_pcre.c - */ - -/* - * Pass an incorrect number of arguments to preg_last_error() to test behaviour - */ - -echo "*** Testing preg_last_error() : error conditions ***\n"; - -// Test preg_last_error with one more than the expected number of arguments -echo "\n-- Testing preg_last_error() function with more than expected no. of arguments --\n"; -$extra_arg = 10; -var_dump( preg_last_error($extra_arg) ); -?> -===Done=== ---EXPECTF-- -*** Testing preg_last_error() : error conditions *** - --- Testing preg_last_error() function with more than expected no. of arguments -- - -Warning: preg_last_error() expects exactly 0 parameters, 1 given in %s on line %d -NULL -===Done=== diff --git a/ext/pcre/tests/preg_match_all_error.phpt b/ext/pcre/tests/preg_match_all_error.phpt deleted file mode 100644 index f6e89284bb..0000000000 --- a/ext/pcre/tests/preg_match_all_error.phpt +++ /dev/null @@ -1,44 +0,0 @@ ---TEST-- -Test preg_match_all() function : error conditions - incorrect number of parameters ---FILE-- -<?php -/* -* proto int preg_match_all(string pattern, string subject, array subpatterns [, int flags [, int offset]]) -* Function is implemented in ext/pcre/php_pcre.c -*/ -echo "*** Testing preg_match_all() : error conditions ***\n"; -// Zero arguments -echo "\n-- Testing preg_match_all() function with Zero arguments --\n"; -var_dump(preg_match_all()); -//Test preg_match_all with one more than the expected number of arguments -echo "\n-- Testing preg_match_all() function with more than expected no. of arguments --\n"; -$pattern = '/\w/'; -$subject = 'string_val'; -$flags = PREG_OFFSET_CAPTURE; -$offset = 10; -$extra_arg = 10; -var_dump(preg_match_all($pattern, $subject, $matches, $flags, $offset, $extra_arg)); -// Testing preg_match_all withone less than the expected number of arguments -echo "\n-- Testing preg_match_all() function with less than expected no. of arguments --\n"; -$pattern = '/\w/'; -var_dump(preg_match_all($pattern)); -echo "Done" -?> ---EXPECTF-- -*** Testing preg_match_all() : error conditions *** - --- Testing preg_match_all() function with Zero arguments -- - -Warning: preg_match_all() expects at least 2 parameters, 0 given in %spreg_match_all_error.php on line %d -bool(false) - --- Testing preg_match_all() function with more than expected no. of arguments -- - -Warning: preg_match_all() expects at most 5 parameters, 6 given in %spreg_match_all_error.php on line %d -bool(false) - --- Testing preg_match_all() function with less than expected no. of arguments -- - -Warning: preg_match_all() expects at least 2 parameters, 1 given in %spreg_match_all_error.php on line %d -bool(false) -Done diff --git a/ext/pcre/tests/preg_match_error.phpt b/ext/pcre/tests/preg_match_error.phpt deleted file mode 100644 index 7d318115f6..0000000000 --- a/ext/pcre/tests/preg_match_error.phpt +++ /dev/null @@ -1,44 +0,0 @@ ---TEST-- -Test preg_match() function : error conditions - wrong numbers of parameters ---FILE-- -<?php -/* - * proto int preg_match(string pattern, string subject [, array subpatterns [, int flags [, int offset]]]) - * Function is implemented in ext/pcre/php_pcre.c -*/ -echo "*** Testing preg_match() : error conditions ***\n"; -// Zero arguments -echo "\n-- Testing preg_match() function with Zero arguments --\n"; -var_dump(preg_match()); -//Test preg_match with one more than the expected number of arguments -echo "\n-- Testing preg_match() function with more than expected no. of arguments --\n"; -$pattern = '/\w/'; -$subject = 'string_val'; -$flags = PREG_OFFSET_CAPTURE; -$offset = 10; -$extra_arg = 10; -var_dump(preg_match($pattern, $subject, $matches, $flags, $offset, $extra_arg)); -// Testing preg_match withone less than the expected number of arguments -echo "\n-- Testing preg_match() function with less than expected no. of arguments --\n"; -$pattern = '/\w/'; -var_dump(preg_match($pattern)); -echo "Done" -?> ---EXPECTF-- -*** Testing preg_match() : error conditions *** - --- Testing preg_match() function with Zero arguments -- - -Warning: preg_match() expects at least 2 parameters, 0 given in %spreg_match_error.php on line %d -bool(false) - --- Testing preg_match() function with more than expected no. of arguments -- - -Warning: preg_match() expects at most 5 parameters, 6 given in %spreg_match_error.php on line %d -bool(false) - --- Testing preg_match() function with less than expected no. of arguments -- - -Warning: preg_match() expects at least 2 parameters, 1 given in %spreg_match_error.php on line %d -bool(false) -Done diff --git a/ext/pcre/tests/preg_quote_error.phpt b/ext/pcre/tests/preg_quote_error.phpt deleted file mode 100644 index b5dd733b2f..0000000000 --- a/ext/pcre/tests/preg_quote_error.phpt +++ /dev/null @@ -1,33 +0,0 @@ ---TEST-- -Test preg_quote() function : error conditions - wrong numbers of parameters ---FILE-- -<?php -/* -* proto string preg_quote(string str [, string delim_char]) -* Function is implemented in ext/pcre/php_pcre.c -*/ -echo "*** Testing preg_quote() : error conditions ***\n"; -// Zero arguments -echo "\n-- Testing preg_quote() function with Zero arguments --\n"; -var_dump(preg_quote()); -//Test preg_quote with one more than the expected number of arguments -echo "\n-- Testing preg_quote() function with more than expected no. of arguments --\n"; -$str = 'string_val'; -$delim_char = '/'; -$extra_arg = 10; -var_dump(preg_quote($str, $delim_char, $extra_arg)); -echo "Done" -?> ---EXPECTF-- -*** Testing preg_quote() : error conditions *** - --- Testing preg_quote() function with Zero arguments -- - -Warning: preg_quote() expects at least 1 parameter, 0 given in %spreg_quote_error.php on line %d -NULL - --- Testing preg_quote() function with more than expected no. of arguments -- - -Warning: preg_quote() expects at most 2 parameters, 3 given in %spreg_quote_error.php on line %d -NULL -Done diff --git a/ext/pcre/tests/preg_quote_error1.phpt b/ext/pcre/tests/preg_quote_error1.phpt deleted file mode 100644 index 6f885f0509..0000000000 --- a/ext/pcre/tests/preg_quote_error1.phpt +++ /dev/null @@ -1,36 +0,0 @@ ---TEST-- -Test preg_quote() function : error conditions - wrong arg types ---FILE-- -<?php -/* -* proto string preg_quote(string str [, string delim_char]) -* Function is implemented in ext/pcre/php_pcre.c -*/ -error_reporting(E_ALL&~E_NOTICE); -/* -* Testing how preg_quote reacts to being passed the wrong type of input argument -*/ -echo "*** Testing preg_quote() : error conditions ***\n"; -$input = array('this is a string', array('this is', 'a subarray'),); -foreach($input as $value) { - print "\nArg value is: $value\n"; - var_dump(preg_quote($value)); -} -$value = new stdclass(); //Object -var_dump(preg_quote($value)); -echo "Done"; -?> ---EXPECTF-- -*** Testing preg_quote() : error conditions *** - -Arg value is: this is a string -string(16) "this is a string" - -Arg value is: Array - -Warning: preg_quote() expects parameter 1 to be string, array given in %spreg_quote_error1.php on line %d -NULL - -Warning: preg_quote() expects parameter 1 to be string, object given in %spreg_quote_error1.php on line %d -NULL -Done diff --git a/ext/pcre/tests/preg_replace_callback_error.phpt b/ext/pcre/tests/preg_replace_callback_error.phpt deleted file mode 100644 index 2834eea4db..0000000000 --- a/ext/pcre/tests/preg_replace_callback_error.phpt +++ /dev/null @@ -1,48 +0,0 @@ ---TEST-- -Test preg_replace_callback() function : error ---FILE-- -<?php -/* -* proto string preg_replace(mixed regex, mixed replace, mixed subject [, int limit [, count]]) -* Function is implemented in ext/pcre/php_pcre.c -*/ -echo "***Testing preg_replace_callback() : error conditions***\n"; -//Zero arguments -echo "\n-- Testing preg_replace_callback() function with Zero arguments --\n"; -var_dump(preg_replace_callback()); -//Test preg_replace_callback() with one more than the expected number of arguments -echo "\n-- Testing preg_replace_callback() function with more than expected no. of arguments --\n"; -$replacement = array('zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'); -function integer_word($matches) { - global $replacement; - return $replacement[$matches[0]]; -} -$regex = '/\d/'; -$subject = 'there are 7 words in this sentence.'; -$limit = 10; -$extra_arg = 10; -var_dump(preg_replace_callback($regex, 'integer_word', $subject, $limit, $count, $extra_arg)); -//Testing preg_replace_callback() with one less than the expected number of arguments -echo "\n-- Testing preg_replace_callback() function with less than expected no. of arguments --\n"; -$regex = '/\d/'; -var_dump(preg_replace_callback($regex, 'integer word')); -echo "Done"; -?> ---EXPECTF-- -***Testing preg_replace_callback() : error conditions*** - --- Testing preg_replace_callback() function with Zero arguments -- - -Warning: preg_replace_callback() expects at least 3 parameters, 0 given in %s on line %d -NULL - --- Testing preg_replace_callback() function with more than expected no. of arguments -- - -Warning: preg_replace_callback() expects at most 5 parameters, 6 given in %s on line %d -NULL - --- Testing preg_replace_callback() function with less than expected no. of arguments -- - -Warning: preg_replace_callback() expects at least 3 parameters, 2 given in %s on line %d -NULL -Done diff --git a/ext/pcre/tests/preg_replace_error.phpt b/ext/pcre/tests/preg_replace_error.phpt deleted file mode 100644 index fc3427d1c8..0000000000 --- a/ext/pcre/tests/preg_replace_error.phpt +++ /dev/null @@ -1,45 +0,0 @@ ---TEST-- -Test preg_replace() function : error - incorrect number of parameters ---FILE-- -<?php -/* -* proto string preg_replace(mixed regex, mixed replace, mixed subject [, int limit [, count]]) -* Function is implemented in ext/pcre/php_pcre.c -*/ -echo "*** Testing preg_replace() : error conditions ***\n"; -//Zero arguments -echo "\n-- Testing preg_replace() function with zero arguments --\n"; -var_dump(preg_replace()); -//Test preg_replace() with one more than the expected number of arguments -echo "\n-- Testing preg_replace() function with more than expected no. of arguments --\n"; -$regex = '/\w/'; -$replace = '1'; -$subject = 'string_val'; -$limit = 10; -$extra_arg = 10; -var_dump(preg_replace($regex, $replace, $subject, $limit, $count, $extra_arg)); -//Testing preg_replace() with one less than the expected number of arguments -echo "\n-- Testing preg_replace() function with less than expected no. of arguments --\n"; -$regex = '/\w/'; -$replace = '1'; -var_dump(preg_replace($regex, $replace)); -echo "Done" -?> ---EXPECTF-- -*** Testing preg_replace() : error conditions *** - --- Testing preg_replace() function with zero arguments -- - -Warning: preg_replace() expects at least 3 parameters, 0 given in %s on line %d -NULL - --- Testing preg_replace() function with more than expected no. of arguments -- - -Warning: preg_replace() expects at most 5 parameters, 6 given in %s on line %d -NULL - --- Testing preg_replace() function with less than expected no. of arguments -- - -Warning: preg_replace() expects at least 3 parameters, 2 given in %s on line %d -NULL -Done diff --git a/ext/pcre/tests/preg_split_error.phpt b/ext/pcre/tests/preg_split_error.phpt deleted file mode 100644 index 45fe6459e6..0000000000 --- a/ext/pcre/tests/preg_split_error.phpt +++ /dev/null @@ -1,44 +0,0 @@ ---TEST-- -Test preg_split() function : error conditions - incorrect number of parameters ---FILE-- -<?php -/* -* proto array preg_split(string pattern, string subject [, int limit [, int flags]]) -* Function is implemented in ext/pcre/php_pcre.c -*/ -echo "*** Testing preg_split() : error conditions ***\n"; -// Zero arguments -echo "\n-- Testing preg_split() function with Zero arguments --\n"; -var_dump(preg_split()); -//Test preg_split with one more than the expected number of arguments -echo "\n-- Testing preg_split() function with more than expected no. of arguments --\n"; -$pattern = '/_/'; -$subject = 'string_val'; -$limit = 10; -$flags = PREG_SPLIT_NO_EMPTY; -$extra_arg = 10; -var_dump(preg_split($pattern, $subject, $limit, $flags, $extra_arg)); -// Testing preg_split withone less than the expected number of arguments -echo "\n-- Testing preg_split() function with less than expected no. of arguments --\n"; -$pattern = '/\./'; -var_dump(preg_split($pattern)); -echo "Done" -?> ---EXPECTF-- -*** Testing preg_split() : error conditions *** - --- Testing preg_split() function with Zero arguments -- - -Warning: preg_split() expects at least 2 parameters, 0 given in %spreg_split_error.php on line %d -bool(false) - --- Testing preg_split() function with more than expected no. of arguments -- - -Warning: preg_split() expects at most 4 parameters, 5 given in %spreg_split_error.php on line %d -bool(false) - --- Testing preg_split() function with less than expected no. of arguments -- - -Warning: preg_split() expects at least 2 parameters, 1 given in %spreg_split_error.php on line %d -bool(false) -Done diff --git a/ext/pcre/tests/preg_split_error2.phpt b/ext/pcre/tests/preg_split_error2.phpt deleted file mode 100644 index 030f757d0a..0000000000 --- a/ext/pcre/tests/preg_split_error2.phpt +++ /dev/null @@ -1,34 +0,0 @@ ---TEST-- -Test preg_split() function : error conditions - wrong arg types ---FILE-- -<?php -/* -* proto array preg_split(string pattern, string subject [, int limit [, int flags]]) -* Function is implemented in ext/pcre/php_pcre.c -*/ -error_reporting(E_ALL&~E_NOTICE); -/* -* Testing how preg_split reacts to being passed the wrong type of input argument -*/ -echo "*** Testing preg_split() : error conditions ***\n"; -$regex = '/[a-zA-Z]/'; -$input = array(array('this is', 'a subarray'),); -foreach($input as $value) { - print "\nArg value is: $value\n"; - var_dump(preg_split($regex, $value)); -} -$value = new stdclass(); //Object -var_dump(preg_split($regex, $value)); -echo "Done"; -?> ---EXPECTF-- -*** Testing preg_split() : error conditions *** - -Arg value is: Array - -Warning: preg_split() expects parameter 2 to be string, array given in %spreg_split_error2.php on line %d -bool(false) - -Warning: preg_split() expects parameter 2 to be string, object given in %spreg_split_error2.php on line %d -bool(false) -Done diff --git a/ext/posix/tests/posix_ctermid_error.phpt b/ext/posix/tests/posix_ctermid_error.phpt deleted file mode 100644 index a177f54578..0000000000 --- a/ext/posix/tests/posix_ctermid_error.phpt +++ /dev/null @@ -1,19 +0,0 @@ ---TEST-- -Test function posix_ctermid() by calling it more than or less than its expected arguments ---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 - -var_dump( posix_ctermid( 'foo' ) ); - -?> ---EXPECTF-- -Warning: posix_ctermid() expects exactly 0 parameters, 1 given in %s on line %d -NULL diff --git a/ext/posix/tests/posix_get_last_error_error.phpt b/ext/posix/tests/posix_get_last_error_error.phpt deleted file mode 100644 index 5400b61598..0000000000 --- a/ext/posix/tests/posix_get_last_error_error.phpt +++ /dev/null @@ -1,31 +0,0 @@ ---TEST-- -Test posix_get_last_error() function : error conditions ---SKIPIF-- -<?php - if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; -?> ---FILE-- -<?php -/* Prototype : proto int posix_get_last_error(void) - * Description: Retrieve the error number set by the last posix function which failed. - * Source code: ext/posix/posix.c - * Alias to functions: posix_errno - */ - -echo "*** Testing posix_get_last_error() : error conditions ***\n"; - -// One argument -echo "\n-- Testing posix_get_last_error() function with one argument --\n"; -$extra_arg = 10; -var_dump( posix_get_last_error($extra_arg) ); - -echo "Done"; -?> ---EXPECTF-- -*** Testing posix_get_last_error() : error conditions *** - --- Testing posix_get_last_error() function with one argument -- - -Warning: posix_get_last_error() expects exactly 0 parameters, 1 given in %s on line %d -NULL -Done diff --git a/ext/posix/tests/posix_getcwd_basic.phpt b/ext/posix/tests/posix_getcwd_basic.phpt deleted file mode 100644 index 9186f5e270..0000000000 --- a/ext/posix/tests/posix_getcwd_basic.phpt +++ /dev/null @@ -1,22 +0,0 @@ ---TEST-- -posix_getcwd(): Basic tests ---SKIPIF-- -<?php -if (!extension_loaded('posix')) die('skip - POSIX extension not loaded'); -if (!function_exists('posix_getcwd')) die('skip posix_getcwd() not found'); -?> ---FILE-- -<?php -echo "Basic test of POSIX posix_getcwd function\n"; -var_dump(posix_getcwd()); -var_dump(posix_getcwd(1)); - -?> -===DONE=== ---EXPECTF-- -Basic test of POSIX posix_getcwd function -string(%d) "%s" - -Warning: posix_getcwd() expects exactly 0 parameters, 1 given in %s on line %d -NULL -===DONE=== diff --git a/ext/posix/tests/posix_geteuid_error1.phpt b/ext/posix/tests/posix_geteuid_error1.phpt deleted file mode 100644 index 941005f028..0000000000 --- a/ext/posix/tests/posix_geteuid_error1.phpt +++ /dev/null @@ -1,37 +0,0 @@ ---TEST-- -Test function posix_geteuid() by calling it more than or less than its expected arguments ---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 by calling method or function with incorrect numbers of arguments ***\n"; - -$extra_args = array( 12312, 2 => '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: posix_geteuid() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: posix_geteuid() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: posix_geteuid() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: posix_geteuid() expects exactly 0 parameters, 1 given in %s on line %d -NULL diff --git a/ext/posix/tests/posix_getgid_error.phpt b/ext/posix/tests/posix_getgid_error.phpt deleted file mode 100644 index f02d07413a..0000000000 --- a/ext/posix/tests/posix_getgid_error.phpt +++ /dev/null @@ -1,31 +0,0 @@ ---TEST-- -Test posix_getgid() function : error conditions ---SKIPIF-- -<?php - if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; -?> ---FILE-- -<?php -/* Prototype : proto int posix_getgid(void) - * Description: Get the current group id (POSIX.1, 4.2.1) - * Source code: ext/posix/posix.c - * Alias to functions: - */ - -echo "*** Testing posix_getgid() : error conditions ***\n"; - -// One argument -echo "\n-- Testing posix_getgid() function with one argument --\n"; -$extra_arg = 10; -var_dump( posix_getgid($extra_arg) ); - -echo "Done"; -?> ---EXPECTF-- -*** Testing posix_getgid() : error conditions *** - --- Testing posix_getgid() function with one argument -- - -Warning: posix_getgid() expects exactly 0 parameters, 1 given in %s on line %d -NULL -Done diff --git a/ext/posix/tests/posix_getgrgid_wrongparams.phpt b/ext/posix/tests/posix_getgrgid_wrongparams.phpt deleted file mode 100644 index d1ff77d193..0000000000 --- a/ext/posix/tests/posix_getgrgid_wrongparams.phpt +++ /dev/null @@ -1,28 +0,0 @@ ---TEST-- -Test parameters on posix_getgrgid(). ---CREDITS-- -Till Klampaeckel, till@php.net -TestFest Berlin 2009 ---SKIPIF-- -<?php -if (!extension_loaded('posix')) { - die('SKIP The posix extension is not loaded.'); -} -if (strtolower(PHP_OS) == 'darwin') { - die('SKIP This test doesn\'t run on MacOSX/Darwin.'); -} ---FILE-- -<?php -$gid = PHP_INT_MAX; // obscene high gid -var_dump(posix_getgrgid($gid)); -var_dump(posix_getgrgid(-1)); -var_dump(posix_getgrgid()); -?> -===DONE=== ---EXPECTF-- -bool(false) -bool(false) - -Warning: posix_getgrgid() expects exactly 1 parameter, 0 given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/posix/tests/posix_getpgrp_error.phpt b/ext/posix/tests/posix_getpgrp_error.phpt deleted file mode 100644 index 6076d688c9..0000000000 --- a/ext/posix/tests/posix_getpgrp_error.phpt +++ /dev/null @@ -1,31 +0,0 @@ ---TEST-- -Test posix_getpgrp() function : error conditions ---SKIPIF-- -<?php - if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; -?> ---FILE-- -<?php -/* Prototype : proto int posix_getpgrp(void) - * Description: Get current process group id (POSIX.1, 4.3.1) - * Source code: ext/posix/posix.c - * Alias to functions: - */ - -echo "*** Testing posix_getpgrp() : error conditions ***\n"; - -// One argument -echo "\n-- Testing posix_getpgrp() function with one argument --\n"; -$extra_arg = 10; -var_dump( posix_getpgrp($extra_arg) ); - -echo "Done"; -?> ---EXPECTF-- -*** Testing posix_getpgrp() : error conditions *** - --- Testing posix_getpgrp() function with one argument -- - -Warning: posix_getpgrp() expects exactly 0 parameters, 1 given in %s on line %d -NULL -Done diff --git a/ext/posix/tests/posix_getpid_error.phpt b/ext/posix/tests/posix_getpid_error.phpt deleted file mode 100644 index 46131b7c9d..0000000000 --- a/ext/posix/tests/posix_getpid_error.phpt +++ /dev/null @@ -1,31 +0,0 @@ ---TEST-- -Test posix_getpid() function : error conditions ---SKIPIF-- -<?php - if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; -?> ---FILE-- -<?php -/* Prototype : proto int posix_getpid(void) - * Description: Get the current process id (POSIX.1, 4.1.1) - * Source code: ext/posix/posix.c - * Alias to functions: - */ - -echo "*** Testing posix_getpid() : error conditions ***\n"; - -// One argument -echo "\n-- Testing posix_getpid() function with one argument --\n"; -$extra_arg = 10; -var_dump( posix_getpid($extra_arg) ); - -echo "Done"; -?> ---EXPECTF-- -*** Testing posix_getpid() : error conditions *** - --- Testing posix_getpid() function with one argument -- - -Warning: posix_getpid() expects exactly 0 parameters, 1 given in %s on line %d -NULL -Done diff --git a/ext/posix/tests/posix_getppid_error.phpt b/ext/posix/tests/posix_getppid_error.phpt deleted file mode 100644 index d962182ba4..0000000000 --- a/ext/posix/tests/posix_getppid_error.phpt +++ /dev/null @@ -1,31 +0,0 @@ ---TEST-- -Test posix_getppid() function : error conditions ---SKIPIF-- -<?php - if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; -?> ---FILE-- -<?php -/* Prototype : proto int posix_getppid(void) - * Description: Get the parent process id (POSIX.1, 4.1.1) - * Source code: ext/posix/posix.c - * Alias to functions: - */ - -echo "*** Testing posix_getppid() : error conditions ***\n"; - -// One argument -echo "\n-- Testing posix_getppid() function with one argument --\n"; -$extra_arg = 10; -var_dump( posix_getppid($extra_arg) ); - -echo "Done"; -?> ---EXPECTF-- -*** Testing posix_getppid() : error conditions *** - --- Testing posix_getppid() function with one argument -- - -Warning: posix_getppid() expects exactly 0 parameters, 1 given in %s on line %d -NULL -Done diff --git a/ext/posix/tests/posix_getuid_error.phpt b/ext/posix/tests/posix_getuid_error.phpt deleted file mode 100644 index 8954108c32..0000000000 --- a/ext/posix/tests/posix_getuid_error.phpt +++ /dev/null @@ -1,31 +0,0 @@ ---TEST-- -Test posix_getuid() function : error conditions ---SKIPIF-- -<?php - if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; -?> ---FILE-- -<?php -/* Prototype : proto int posix_getuid(void) - * Description: Get the current user id (POSIX.1, 4.2.1) - * Source code: ext/posix/posix.c - * Alias to functions: - */ - -echo "*** Testing posix_getuid() : error conditions ***\n"; - -// One argument -echo "\n-- Testing posix_getuid() function with one argument --\n"; -$extra_arg = 10; -var_dump( posix_getuid($extra_arg) ); - -echo "Done"; -?> ---EXPECTF-- -*** Testing posix_getuid() : error conditions *** - --- Testing posix_getuid() function with one argument -- - -Warning: posix_getuid() expects exactly 0 parameters, 1 given in %s on line %d -NULL -Done diff --git a/ext/posix/tests/posix_initgroups_basic.phpt b/ext/posix/tests/posix_initgroups_basic.phpt deleted file mode 100644 index 47d75f0745..0000000000 --- a/ext/posix/tests/posix_initgroups_basic.phpt +++ /dev/null @@ -1,22 +0,0 @@ ---TEST-- -posix_initgroups(): Basic tests ---SKIPIF-- -<?php -if (!extension_loaded('posix')) die('skip - POSIX extension not loaded'); -if (!function_exists('posix_initgroups')) die('skip posix_initgroups() not found'); -?> ---FILE-- -<?php -echo "Basic test of POSIX posix_initgroups function\n"; -var_dump(posix_initgroups('foo', 'bar')); -var_dump(posix_initgroups(NULL, NULL)); - -?> -===DONE==== ---EXPECTF-- -Basic test of POSIX posix_initgroups function - -Warning: posix_initgroups() expects parameter 2 to be int, string given in %s on line %d -bool(false) -bool(false) -===DONE==== diff --git a/ext/posix/tests/posix_mkfifo_wrongparams.phpt b/ext/posix/tests/posix_mkfifo_wrongparams.phpt deleted file mode 100644 index 0d4df7b6e6..0000000000 --- a/ext/posix/tests/posix_mkfifo_wrongparams.phpt +++ /dev/null @@ -1,21 +0,0 @@ ---TEST-- -Test parameter validation in posix_mkfifo(). ---CREDITS-- -Till Klampaeckel, till@php.net -TestFest Berlin 2009 ---SKIPIF-- -<?php -if (!extension_loaded('posix')) { - die('SKIP The posix extension is not loaded.'); -} -?> ---FILE-- -<?php -posix_mkfifo(null); -var_dump(posix_mkfifo(null, 0644)); -?> -===DONE=== ---EXPECTF-- -Warning: posix_mkfifo() expects exactly 2 parameters, 1 given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/posix/tests/posix_seteuid_error.phpt b/ext/posix/tests/posix_seteuid_error.phpt deleted file mode 100644 index 1ac3a38226..0000000000 --- a/ext/posix/tests/posix_seteuid_error.phpt +++ /dev/null @@ -1,32 +0,0 @@ ---TEST-- -Test function posix_seteuid() by calling it more than or less than its expected arguments ---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 by calling method or function with incorrect numbers of arguments ***\n"; - -$uid = '123'; -$extra_arg = '12312'; - -var_dump(posix_seteuid( $uid, $extra_arg ) ); -var_dump(posix_seteuid( ) ); - - -?> ---EXPECTF-- -*** Test by calling method or function with incorrect numbers of arguments *** - -Warning: posix_seteuid() expects exactly 1 parameter, 2 given in %s on line 9 -bool(false) - -Warning: posix_seteuid() expects exactly 1 parameter, 0 given in %s on line 10 -bool(false) diff --git a/ext/posix/tests/posix_seteuid_variation1.phpt b/ext/posix/tests/posix_seteuid_variation1.phpt deleted file mode 100644 index 6131b928a0..0000000000 --- a/ext/posix/tests/posix_seteuid_variation1.phpt +++ /dev/null @@ -1,41 +0,0 @@ ---TEST-- -Test function posix_seteuid() by substituting argument 1 with array 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 - -$index_array = array(1, 2, 3); -$assoc_array = array(1 => 'one', 2 => 'two'); - -$variation_array = array( - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - ); - - -foreach ( $variation_array as $var ) { - var_dump(posix_seteuid( $var ) ); -} - -?> ---EXPECTF-- -Warning: posix_seteuid() expects parameter 1 to be int, array given in %s on line 15 -bool(false) - -Warning: posix_seteuid() expects parameter 1 to be int, array given in %s on line 15 -bool(false) - -Warning: posix_seteuid() expects parameter 1 to be int, array given in %s on line 15 -bool(false) - -Warning: posix_seteuid() expects parameter 1 to be int, array given in %s on line 15 -bool(false) diff --git a/ext/posix/tests/posix_seteuid_variation6.phpt b/ext/posix/tests/posix_seteuid_variation6.phpt deleted file mode 100644 index 9c0c3868f5..0000000000 --- a/ext/posix/tests/posix_seteuid_variation6.phpt +++ /dev/null @@ -1,48 +0,0 @@ ---TEST-- -Test function posix_seteuid() by substituting argument 1 with string 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 string values ***\n"; - - - -$heredoc = <<<EOT -hello world -EOT; - -$variation_array = array( - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - ); - - -foreach ( $variation_array as $var ) { - var_dump(posix_seteuid( $var ) ); -} -?> ---EXPECTF-- -*** Test substituting argument 1 with string values *** - -Warning: posix_seteuid() expects parameter 1 to be int, string given in %s on line 21 -bool(false) - -Warning: posix_seteuid() expects parameter 1 to be int, string given in %s on line 21 -bool(false) - -Warning: posix_seteuid() expects parameter 1 to be int, string given in %s on line 21 -bool(false) - -Warning: posix_seteuid() expects parameter 1 to be int, string given in %s on line 21 -bool(false) diff --git a/ext/posix/tests/posix_setgid_error.phpt b/ext/posix/tests/posix_setgid_error.phpt deleted file mode 100644 index 169bd9f9ab..0000000000 --- a/ext/posix/tests/posix_setgid_error.phpt +++ /dev/null @@ -1,32 +0,0 @@ ---TEST-- -Test function posix_setgid() by calling it more than or less than its expected arguments. ---SKIPIF-- -<?php - if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; -?> -Marco Fabbri mrfabbri@gmail.com -Francesco Fullone ff@ideato.it -#PHPTestFest Cesena Italia on 2009-06-20 ---FILE-- -<?php - - -echo "*** Test by calling method or function with incorrect numbers of arguments ***\n"; - -$gid = posix_getgid(); -$extra_arg = '123'; - -var_dump(posix_setgid( $gid, $extra_arg ) ); -var_dump(posix_setgid( ) ); - -?> -===DONE=== ---EXPECTF-- -*** Test by calling method or function with incorrect numbers of arguments *** - -Warning: posix_setgid() expects exactly 1 parameter, 2 given in %s on line %d -bool(false) - -Warning: posix_setgid() expects exactly 1 parameter, 0 given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/posix/tests/posix_setgid_variation1.phpt b/ext/posix/tests/posix_setgid_variation1.phpt deleted file mode 100644 index bb4b9b3f8b..0000000000 --- a/ext/posix/tests/posix_setgid_variation1.phpt +++ /dev/null @@ -1,47 +0,0 @@ ---TEST-- -Test function posix_setgid() by substituting argument 1 with array 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 array values ***\n"; - -$index_array = array(1, 2, 3); -$assoc_array = array(1 => 'one', 2 => 'two'); - -$variation_array = array( - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - ); - - -foreach ( $variation_array as $var ) { - var_dump(posix_setgid( $var ) ); -} -?> -===DONE=== ---EXPECTF-- -*** Test substituting argument 1 with array values *** - -Warning: posix_setgid() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Warning: posix_setgid() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Warning: posix_setgid() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Warning: posix_setgid() expects parameter 1 to be int, array given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/posix/tests/posix_setgid_variation7.phpt b/ext/posix/tests/posix_setgid_variation7.phpt deleted file mode 100644 index 0c4ef502f4..0000000000 --- a/ext/posix/tests/posix_setgid_variation7.phpt +++ /dev/null @@ -1,48 +0,0 @@ ---TEST-- -Test function posix_setgid() by substituting argument 1 with string 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"; -?> ---FILE-- -<?php - - -echo "*** Test substituting argument 1 with string values ***\n"; - - - -$heredoc = <<<EOT -hello world -EOT; - -$variation_array = array( - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - ); - - -foreach ( $variation_array as $var ) { - var_dump(posix_setgid( $var ) ); -} -?> ---EXPECTF-- -*** Test substituting argument 1 with string values *** - -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) - -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) diff --git a/ext/posix/tests/posix_setuid_error.phpt b/ext/posix/tests/posix_setuid_error.phpt deleted file mode 100644 index f1522e663c..0000000000 --- a/ext/posix/tests/posix_setuid_error.phpt +++ /dev/null @@ -1,35 +0,0 @@ ---TEST-- -Test function posix_setuid() by calling it more than or less than its expected arguments ---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 by calling method or function with incorrect numbers of arguments ***\n"; - -$uid = '123'; - - -$extra_arg = '12312'; - -var_dump(posix_setuid( $uid, $extra_arg ) ); - -var_dump(posix_setuid( ) ); - - -?> ---EXPECTF-- -*** Test by calling method or function with incorrect numbers of arguments *** - -Warning: posix_setuid() expects exactly 1 parameter, 2 given in %s on line 11 -bool(false) - -Warning: posix_setuid() expects exactly 1 parameter, 0 given in %s on line 13 -bool(false) diff --git a/ext/posix/tests/posix_setuid_variation1.phpt b/ext/posix/tests/posix_setuid_variation1.phpt deleted file mode 100644 index 42ad939b61..0000000000 --- a/ext/posix/tests/posix_setuid_variation1.phpt +++ /dev/null @@ -1,41 +0,0 @@ ---TEST-- -Test function posix_setuid() by substituting argument 1 with array 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 - -$index_array = array(1, 2, 3); -$assoc_array = array(1 => 'one', 2 => 'two'); - -$variation_array = array( - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - ); - - -foreach ( $variation_array as $var ) { - var_dump(posix_setuid( $var ) ); -} - -?> ---EXPECTF-- -Warning: posix_setuid() expects parameter 1 to be int, array given in %s on line 15 -bool(false) - -Warning: posix_setuid() expects parameter 1 to be int, array given in %s on line 15 -bool(false) - -Warning: posix_setuid() expects parameter 1 to be int, array given in %s on line 15 -bool(false) - -Warning: posix_setuid() expects parameter 1 to be int, array given in %s on line 15 -bool(false) diff --git a/ext/posix/tests/posix_setuid_variation6.phpt b/ext/posix/tests/posix_setuid_variation6.phpt deleted file mode 100644 index 9fd6ffe71c..0000000000 --- a/ext/posix/tests/posix_setuid_variation6.phpt +++ /dev/null @@ -1,48 +0,0 @@ ---TEST-- -Test function posix_setuid() by substituting argument 1 with string 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 string values ***\n"; - - - -$heredoc = <<<EOT -hello world -EOT; - -$variation_array = array( - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - ); - - -foreach ( $variation_array as $var ) { - var_dump(posix_setuid( $var ) ); -} -?> ---EXPECTF-- -*** Test substituting argument 1 with string values *** - -Warning: posix_setuid() expects parameter 1 to be int, string given in %s on line 21 -bool(false) - -Warning: posix_setuid() expects parameter 1 to be int, string given in %s on line 21 -bool(false) - -Warning: posix_setuid() expects parameter 1 to be int, string given in %s on line 21 -bool(false) - -Warning: posix_setuid() expects parameter 1 to be int, string given in %s on line 21 -bool(false) diff --git a/ext/posix/tests/posix_times_error.phpt b/ext/posix/tests/posix_times_error.phpt deleted file mode 100644 index 0f8a9e3601..0000000000 --- a/ext/posix/tests/posix_times_error.phpt +++ /dev/null @@ -1,31 +0,0 @@ ---TEST-- -Test posix_times() function : error conditions ---SKIPIF-- -<?php - if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; -?> ---FILE-- -<?php -/* Prototype : proto array posix_times(void) - * Description: Get process times (POSIX.1, 4.5.2) - * Source code: ext/posix/posix.c - * Alias to functions: - */ - -echo "*** Testing posix_times() : error conditions ***\n"; - -// One argument -echo "\n-- Testing posix_times() function with one argument --\n"; -$extra_arg = 10; -var_dump( posix_times($extra_arg) ); - -echo "Done"; -?> ---EXPECTF-- -*** Testing posix_times() : error conditions *** - --- Testing posix_times() function with one argument -- - -Warning: posix_times() expects exactly 0 parameters, 1 given in %s on line %d -NULL -Done diff --git a/ext/posix/tests/posix_ttyname_error.phpt b/ext/posix/tests/posix_ttyname_error.phpt deleted file mode 100644 index effa709717..0000000000 --- a/ext/posix/tests/posix_ttyname_error.phpt +++ /dev/null @@ -1,35 +0,0 @@ ---TEST-- -Test function posix_ttyname() by calling it more than or less than its expected arguments ---CREDITS-- -Marco Fabbri mrfabbri@gmail.com -Francesco Fullone ff@ideato.it -#PHPTestFest Cesena Italia on 2009-06-20 ---SKIPIF-- -<?php -if (!extension_loaded('posix')) { - die('SKIP The posix extension is not loaded.'); -} -?> ---FILE-- -<?php - - -echo "*** Test by calling method or function with incorrect numbers of arguments ***\n"; - -$fd = 'foo'; -$extra_arg = 'bar'; - -var_dump(posix_ttyname( $fd, $extra_arg ) ); - -var_dump(posix_ttyname( ) ); - - -?> ---EXPECTF-- -*** Test by calling method or function with incorrect numbers of arguments *** - -Warning: posix_ttyname() expects exactly 1 parameter, 2 given in %s on line %d -bool(false) - -Warning: posix_ttyname() expects exactly 1 parameter, 0 given in %s on line %d -bool(false) diff --git a/ext/posix/tests/posix_uname_error.phpt b/ext/posix/tests/posix_uname_error.phpt deleted file mode 100644 index 09c435fe69..0000000000 --- a/ext/posix/tests/posix_uname_error.phpt +++ /dev/null @@ -1,31 +0,0 @@ ---TEST-- -Test posix_uname() function : error conditions ---SKIPIF-- -<?php - if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; -?> ---FILE-- -<?php -/* Prototype : proto array posix_uname(void) - * Description: Get system name (POSIX.1, 4.4.1) - * Source code: ext/posix/posix.c - * Alias to functions: - */ - -echo "*** Testing posix_uname() : error conditions ***\n"; - -// One argument -echo "\n-- Testing posix_uname() function with one argument --\n"; -$extra_arg = 10; -var_dump( posix_uname($extra_arg) ); - -echo "Done"; -?> ---EXPECTF-- -*** Testing posix_uname() : error conditions *** - --- Testing posix_uname() function with one argument -- - -Warning: posix_uname() expects exactly 0 parameters, 1 given in %s on line %d -NULL -Done diff --git a/ext/reflection/tests/ReflectionClass_FileInfo_error.phpt b/ext/reflection/tests/ReflectionClass_FileInfo_error.phpt deleted file mode 100644 index a4e5f95564..0000000000 --- a/ext/reflection/tests/ReflectionClass_FileInfo_error.phpt +++ /dev/null @@ -1,37 +0,0 @@ ---TEST-- -ReflectionClass::getFileName(), ReflectionClass::getStartLine(), ReflectionClass::getEndLine() - bad params ---FILE-- -<?php -Class C { } - -$rc = new ReflectionClass("C"); -$methods = array("getFileName", "getStartLine", "getEndLine"); - -foreach ($methods as $method) { - var_dump($rc->$method()); - var_dump($rc->$method(null)); - var_dump($rc->$method('X', 0)); -} -?> ---EXPECTF-- -string(%d) "%s" - -Warning: ReflectionClass::getFileName() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::getFileName() expects exactly 0 parameters, 2 given in %s on line %d -NULL -int(2) - -Warning: ReflectionClass::getStartLine() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::getStartLine() expects exactly 0 parameters, 2 given in %s on line %d -NULL -int(2) - -Warning: ReflectionClass::getEndLine() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::getEndLine() expects exactly 0 parameters, 2 given in %s on line %d -NULL diff --git a/ext/reflection/tests/ReflectionClass_getConstructor_error.phpt b/ext/reflection/tests/ReflectionClass_getConstructor_error.phpt deleted file mode 100644 index 7e8932a5ed..0000000000 --- a/ext/reflection/tests/ReflectionClass_getConstructor_error.phpt +++ /dev/null @@ -1,23 +0,0 @@ ---TEST-- -ReflectionClass::getConstructor() - bad params ---FILE-- -<?php -class C {} -$rc = new ReflectionClass('C'); -var_dump($rc->getConstructor(null)); -var_dump($rc->getConstructor('X')); -var_dump($rc->getConstructor(true)); -var_dump($rc->getConstructor(array(1,2,3))); -?> ---EXPECTF-- -Warning: ReflectionClass::getConstructor() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::getConstructor() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::getConstructor() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::getConstructor() expects exactly 0 parameters, 1 given in %s on line %d -NULL diff --git a/ext/reflection/tests/ReflectionClass_getDefaultProperties_002.phpt b/ext/reflection/tests/ReflectionClass_getDefaultProperties_002.phpt deleted file mode 100644 index 7c178ac8ea..0000000000 --- a/ext/reflection/tests/ReflectionClass_getDefaultProperties_002.phpt +++ /dev/null @@ -1,44 +0,0 @@ ---TEST-- -ReflectionClass::getDefaultProperties(), ReflectionClass::getStaticProperties() - wrong param count ---CREDITS-- -Robin Fernandes <robinf@php.net> -Steve Seear <stevseea@php.net> ---FILE-- -<?php -interface I {} -class C implements I {} -$rc = new ReflectionClass('C'); -var_dump($rc->getDefaultProperties(null)); -var_dump($rc->getDefaultProperties('X')); -var_dump($rc->getDefaultProperties(true)); -var_dump($rc->getDefaultProperties(array(1,2,3))); -var_dump($rc->getStaticProperties(null)); -var_dump($rc->getStaticProperties('X')); -var_dump($rc->getStaticProperties(true)); -var_dump($rc->getStaticProperties(array(1,2,3))); - -?> ---EXPECTF-- -Warning: ReflectionClass::getDefaultProperties() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::getDefaultProperties() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::getDefaultProperties() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::getDefaultProperties() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::getStaticProperties() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::getStaticProperties() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::getStaticProperties() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::getStaticProperties() expects exactly 0 parameters, 1 given in %s on line %d -NULL diff --git a/ext/reflection/tests/ReflectionClass_getDocComment_002.phpt b/ext/reflection/tests/ReflectionClass_getDocComment_002.phpt deleted file mode 100644 index 5bbd596488..0000000000 --- a/ext/reflection/tests/ReflectionClass_getDocComment_002.phpt +++ /dev/null @@ -1,26 +0,0 @@ ---TEST-- -ReflectionClass::getDocComment() - bad params ---CREDITS-- -Robin Fernandes <robinf@php.net> -Steve Seear <stevseea@php.net> ---FILE-- -<?php -class C {} -$rc = new ReflectionClass('C'); -var_dump($rc->getDocComment(null)); -var_dump($rc->getDocComment('X')); -var_dump($rc->getDocComment(true)); -var_dump($rc->getDocComment(array(1,2,3))); -?> ---EXPECTF-- -Warning: ReflectionClass::getDocComment() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::getDocComment() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::getDocComment() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::getDocComment() expects exactly 0 parameters, 1 given in %s on line %d -NULL diff --git a/ext/reflection/tests/ReflectionClass_getInterfaces_004.phpt b/ext/reflection/tests/ReflectionClass_getInterfaces_004.phpt deleted file mode 100644 index f62d58cd72..0000000000 --- a/ext/reflection/tests/ReflectionClass_getInterfaces_004.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -ReflectionClass::getInterfaces() - wrong param count ---CREDITS-- -Robin Fernandes <robinf@php.net> -Steve Seear <stevseea@php.net> ---FILE-- -<?php -interface I {} -class C implements I {} -$rc = new ReflectionClass('C'); -var_dump($rc->getInterfaces(null)); -var_dump($rc->getInterfaces('X')); -var_dump($rc->getInterfaces(true)); -var_dump($rc->getInterfaces(array(1,2,3))); -?> ---EXPECTF-- -Warning: ReflectionClass::getInterfaces() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::getInterfaces() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::getInterfaces() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::getInterfaces() expects exactly 0 parameters, 1 given in %s on line %d -NULL diff --git a/ext/reflection/tests/ReflectionClass_getMethods_002.phpt b/ext/reflection/tests/ReflectionClass_getMethods_002.phpt deleted file mode 100644 index b6a78aa318..0000000000 --- a/ext/reflection/tests/ReflectionClass_getMethods_002.phpt +++ /dev/null @@ -1,18 +0,0 @@ ---TEST-- -ReflectionClass::getMethods() - invalid arguments ---CREDITS-- -Robin Fernandes <robinf@php.net> -Steve Seear <stevseea@php.net> ---FILE-- -<?php -$rc = new ReflectionClass("ReflectionClass"); -echo "\nTest invalid arguments:"; -$rc->getMethods('X'); -$rc->getMethods('X', true); - -?> ---EXPECTF-- -Test invalid arguments: -Warning: ReflectionClass::getMethods() expects parameter 1 to be int, string given in %s on line 4 - -Warning: ReflectionClass::getMethods() expects at most 1 parameter, 2 given in %s on line 5 diff --git a/ext/reflection/tests/ReflectionClass_getName_error.phpt b/ext/reflection/tests/ReflectionClass_getName_error.phpt deleted file mode 100644 index 145704e7bc..0000000000 --- a/ext/reflection/tests/ReflectionClass_getName_error.phpt +++ /dev/null @@ -1,16 +0,0 @@ ---TEST-- -ReflectionClass::getName() - invalid params ---FILE-- -<?php - -$r1 = new ReflectionClass("stdClass"); - -var_dump($r1->getName('X')); -var_dump($r1->getName('X', true)); -?> ---EXPECTF-- -Warning: ReflectionClass::getName() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::getName() expects exactly 0 parameters, 2 given in %s on line %d -NULL diff --git a/ext/reflection/tests/ReflectionClass_getProperties_002.phpt b/ext/reflection/tests/ReflectionClass_getProperties_002.phpt deleted file mode 100644 index 1f7dc24d74..0000000000 --- a/ext/reflection/tests/ReflectionClass_getProperties_002.phpt +++ /dev/null @@ -1,17 +0,0 @@ ---TEST-- -ReflectionClass::getProperties() - invalid arguments ---CREDITS-- -Robin Fernandes <robinf@php.net> -Steve Seear <stevseea@php.net> ---FILE-- -<?php -$rc = new ReflectionClass("ReflectionClass"); -echo "\nTest invalid arguments:"; -$rc->getProperties('X'); -$rc->getProperties('X', true); -?> ---EXPECTF-- -Test invalid arguments: -Warning: ReflectionClass::getProperties() expects parameter 1 to be int, string given in %s on line 4 - -Warning: ReflectionClass::getProperties() expects at most 1 parameter, 2 given in %s on line 5 diff --git a/ext/reflection/tests/ReflectionClass_isInstance_error.phpt b/ext/reflection/tests/ReflectionClass_isInstance_error.phpt deleted file mode 100644 index f4c553dec6..0000000000 --- a/ext/reflection/tests/ReflectionClass_isInstance_error.phpt +++ /dev/null @@ -1,39 +0,0 @@ ---TEST-- -ReflectionClass::isInstance() - invalid params ---FILE-- -<?php -class X {} - -$rc = new ReflectionClass("X"); -$instance = new X; - -var_dump($rc->isInstance()); -var_dump($rc->isInstance($instance, $instance)); -var_dump($rc->isInstance(1)); -var_dump($rc->isInstance(1.5)); -var_dump($rc->isInstance(true)); -var_dump($rc->isInstance('X')); -var_dump($rc->isInstance(null)); - -?> ---EXPECTF-- -Warning: ReflectionClass::isInstance() expects exactly 1 parameter, 0 given in %s on line 7 -NULL - -Warning: ReflectionClass::isInstance() expects exactly 1 parameter, 2 given in %s on line 8 -NULL - -Warning: ReflectionClass::isInstance() expects parameter 1 to be object, %s given in %s on line 9 -NULL - -Warning: ReflectionClass::isInstance() expects parameter 1 to be object, float given in %s on line 10 -NULL - -Warning: ReflectionClass::isInstance() expects parameter 1 to be object, bool given in %s on line 11 -NULL - -Warning: ReflectionClass::isInstance() expects parameter 1 to be object, string given in %s on line 12 -NULL - -Warning: ReflectionClass::isInstance() expects parameter 1 to be object, null given in %s on line 13 -NULL diff --git a/ext/reflection/tests/ReflectionClass_isInstantiable_error.phpt b/ext/reflection/tests/ReflectionClass_isInstantiable_error.phpt deleted file mode 100644 index 5263643023..0000000000 --- a/ext/reflection/tests/ReflectionClass_isInstantiable_error.phpt +++ /dev/null @@ -1,21 +0,0 @@ ---TEST-- -ReflectionClass::IsInstantiable() ---FILE-- -<?php -class privateCtorOld { - private function privateCtorOld() {} -} -$reflectionClass = new ReflectionClass("privateCtorOld"); - -var_dump($reflectionClass->IsInstantiable('X')); -var_dump($reflectionClass->IsInstantiable(0, null)); - -?> ---EXPECTF-- -Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; privateCtorOld has a deprecated constructor in %s on line %d - -Warning: ReflectionClass::isInstantiable() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::isInstantiable() expects exactly 0 parameters, 2 given in %s on line %d -NULL diff --git a/ext/reflection/tests/ReflectionClass_isInternal_error.phpt b/ext/reflection/tests/ReflectionClass_isInternal_error.phpt deleted file mode 100644 index ef69a4c393..0000000000 --- a/ext/reflection/tests/ReflectionClass_isInternal_error.phpt +++ /dev/null @@ -1,14 +0,0 @@ ---TEST-- -ReflectionClass::isInternal() - invalid params ---FILE-- -<?php -$r1 = new ReflectionClass("stdClass"); -var_dump($r1->isInternal('X')); -var_dump($r1->isInternal('X', true)); -?> ---EXPECTF-- -Warning: ReflectionClass::isInternal() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::isInternal() expects exactly 0 parameters, 2 given in %s on line %d -NULL diff --git a/ext/reflection/tests/ReflectionClass_isSubclassOf_error.phpt b/ext/reflection/tests/ReflectionClass_isSubclassOf_error.phpt deleted file mode 100644 index 7d929fafd7..0000000000 --- a/ext/reflection/tests/ReflectionClass_isSubclassOf_error.phpt +++ /dev/null @@ -1,17 +0,0 @@ ---TEST-- -ReflectionClass::isSubclassOf() - invalid number of parameters ---FILE-- -<?php -class A {} -$rc = new ReflectionClass('A'); - -var_dump($rc->isSubclassOf()); -var_dump($rc->isSubclassOf('A',5)); - -?> ---EXPECTF-- -Warning: ReflectionClass::isSubclassOf() expects exactly 1 parameter, 0 given in %s on line 5 -NULL - -Warning: ReflectionClass::isSubclassOf() expects exactly 1 parameter, 2 given in %s on line 6 -NULL diff --git a/ext/reflection/tests/ReflectionClass_isUserDefined_error.phpt b/ext/reflection/tests/ReflectionClass_isUserDefined_error.phpt deleted file mode 100644 index ac88884179..0000000000 --- a/ext/reflection/tests/ReflectionClass_isUserDefined_error.phpt +++ /dev/null @@ -1,14 +0,0 @@ ---TEST-- -ReflectionClass::isUserDefined() - invalid params. ---FILE-- -<?php -$r1 = new ReflectionClass("stdClass"); -var_dump($r1->isUserDefined('X')); -var_dump($r1->isUserDefined('X', true)); -?> ---EXPECTF-- -Warning: ReflectionClass::isUserDefined() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::isUserDefined() expects exactly 0 parameters, 2 given in %s on line %d -NULL diff --git a/ext/reflection/tests/ReflectionClass_modifiers_002.phpt b/ext/reflection/tests/ReflectionClass_modifiers_002.phpt deleted file mode 100644 index a3a567ccbb..0000000000 --- a/ext/reflection/tests/ReflectionClass_modifiers_002.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -Modifiers - wrong param count ---CREDITS-- -Robin Fernandes <robinf@php.net> -Steve Seear <stevseea@php.net> ---FILE-- -<?php -class C {} -$rc = new ReflectionClass("C"); -var_dump($rc->isFinal('X')); -var_dump($rc->isInterface(null)); -var_dump($rc->isAbstract(true)); -var_dump($rc->getModifiers(array(1,2,3))); - -?> ---EXPECTF-- -Warning: ReflectionClass::isFinal() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::isInterface() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::isAbstract() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::getModifiers() expects exactly 0 parameters, 1 given in %s on line %d -NULL diff --git a/ext/reflection/tests/ReflectionFunction_getClosure_error.phpt b/ext/reflection/tests/ReflectionFunction_getClosure_error.phpt deleted file mode 100644 index 9a963e41ca..0000000000 --- a/ext/reflection/tests/ReflectionFunction_getClosure_error.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -Test ReflectionFunction::getClosure() function : error functionality ---FILE-- -<?php -/* Prototype : public mixed ReflectionFunction::getClosure() - * Description: Returns a dynamically created closure for the function - * Source code: ext/reflection/php_reflection.c - * Alias to functions: - */ - -echo "*** Testing ReflectionFunction::getClosure() : error conditions ***\n"; - -function foo() -{ - var_dump( "Inside foo function" ); -} - -$func = new ReflectionFunction( 'foo' ); -$closure = $func->getClosure('bar'); - -?> -===DONE=== ---EXPECTF-- -*** Testing ReflectionFunction::getClosure() : error conditions *** - -Warning: ReflectionFunction::getClosure() expects exactly 0 parameters, 1 given in %s on line %d -===DONE=== diff --git a/ext/reflection/tests/ReflectionMethod_getDocComment_error.phpt b/ext/reflection/tests/ReflectionMethod_getDocComment_error.phpt deleted file mode 100644 index 02de25bab0..0000000000 --- a/ext/reflection/tests/ReflectionMethod_getDocComment_error.phpt +++ /dev/null @@ -1,15 +0,0 @@ ---TEST-- -ReflectionMethod::getDocComment() errors ---FILE-- -<?php -class C { function f() {} } -$rc = new ReflectionMethod('C::f'); -var_dump($rc->getDocComment(null)); -var_dump($rc->getDocComment('X')); -?> ---EXPECTF-- -Warning: ReflectionFunctionAbstract::getDocComment() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionFunctionAbstract::getDocComment() expects exactly 0 parameters, 1 given in %s on line %d -NULL diff --git a/ext/reflection/tests/ReflectionObject_FileInfo_error.phpt b/ext/reflection/tests/ReflectionObject_FileInfo_error.phpt deleted file mode 100644 index 70ad24297d..0000000000 --- a/ext/reflection/tests/ReflectionObject_FileInfo_error.phpt +++ /dev/null @@ -1,37 +0,0 @@ ---TEST-- -ReflectionObject::getFileName(), ReflectionObject::getStartLine(), ReflectionObject::getEndLine() -invalid aparams ---FILE-- -<?php -Class C { } - -$rc = new ReflectionObject(new C); -$methods = array("getFileName", "getStartLine", "getEndLine"); - -foreach ($methods as $method) { - var_dump($rc->$method()); - var_dump($rc->$method(null)); - var_dump($rc->$method('X', 0)); -} -?> ---EXPECTF-- -string(%d) "%s" - -Warning: ReflectionClass::getFileName() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::getFileName() expects exactly 0 parameters, 2 given in %s on line %d -NULL -int(2) - -Warning: ReflectionClass::getStartLine() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::getStartLine() expects exactly 0 parameters, 2 given in %s on line %d -NULL -int(2) - -Warning: ReflectionClass::getEndLine() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::getEndLine() expects exactly 0 parameters, 2 given in %s on line %d -NULL diff --git a/ext/reflection/tests/ReflectionObject_getConstants_error.phpt b/ext/reflection/tests/ReflectionObject_getConstants_error.phpt deleted file mode 100644 index d3b90805eb..0000000000 --- a/ext/reflection/tests/ReflectionObject_getConstants_error.phpt +++ /dev/null @@ -1,17 +0,0 @@ ---TEST-- -ReflectionObject::getConstants() - invalid params ---FILE-- -<?php -class X { -} - -$rc = new ReflectionObject(new X); - -$rc->getConstants('X'); -$rc->getConstants(true); - -?> ---EXPECTF-- -Warning: ReflectionClass::getConstants() expects exactly 0 parameters, 1 given in %s on line %d - -Warning: ReflectionClass::getConstants() expects exactly 0 parameters, 1 given in %s on line %d diff --git a/ext/reflection/tests/ReflectionObject_getConstructor_error.phpt b/ext/reflection/tests/ReflectionObject_getConstructor_error.phpt deleted file mode 100644 index 2f52de2ed8..0000000000 --- a/ext/reflection/tests/ReflectionObject_getConstructor_error.phpt +++ /dev/null @@ -1,23 +0,0 @@ ---TEST-- -ReflectionObject::getConstructor() - invalid params ---FILE-- -<?php -class C {} -$rc = new ReflectionObject(new C); -var_dump($rc->getConstructor(null)); -var_dump($rc->getConstructor('X')); -var_dump($rc->getConstructor(true)); -var_dump($rc->getConstructor(array(1,2,3))); -?> ---EXPECTF-- -Warning: ReflectionClass::getConstructor() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::getConstructor() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::getConstructor() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::getConstructor() expects exactly 0 parameters, 1 given in %s on line %d -NULL diff --git a/ext/reflection/tests/ReflectionObject_getName_error.phpt b/ext/reflection/tests/ReflectionObject_getName_error.phpt deleted file mode 100644 index ff8e279e9b..0000000000 --- a/ext/reflection/tests/ReflectionObject_getName_error.phpt +++ /dev/null @@ -1,23 +0,0 @@ ---TEST-- -ReflectionObject::getname() - invalid params ---FILE-- -<?php -class C { } -$myInstance = new C; -$r2 = new ReflectionObject($myInstance); - -$r3 = new ReflectionObject($r2); - -var_dump($r3->getName(null)); -var_dump($r3->getName('x','y')); -var_dump($r3->getName(0)); -?> ---EXPECTF-- -Warning: ReflectionClass::getName() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::getName() expects exactly 0 parameters, 2 given in %s on line %d -NULL - -Warning: ReflectionClass::getName() expects exactly 0 parameters, 1 given in %s on line %d -NULL diff --git a/ext/reflection/tests/ReflectionObject_isInstance_error.phpt b/ext/reflection/tests/ReflectionObject_isInstance_error.phpt deleted file mode 100644 index fa0befa504..0000000000 --- a/ext/reflection/tests/ReflectionObject_isInstance_error.phpt +++ /dev/null @@ -1,38 +0,0 @@ ---TEST-- -ReflectionObject::isInstance() - invalid params ---FILE-- -<?php -class X {} -$instance = new X; -$ro = new ReflectionObject(new X); - -var_dump($ro->isInstance()); -var_dump($ro->isInstance($instance, $instance)); -var_dump($ro->isInstance(1)); -var_dump($ro->isInstance(1.5)); -var_dump($ro->isInstance(true)); -var_dump($ro->isInstance('X')); -var_dump($ro->isInstance(null)); - -?> ---EXPECTF-- -Warning: ReflectionClass::isInstance() expects exactly 1 parameter, 0 given in %s on line 6 -NULL - -Warning: ReflectionClass::isInstance() expects exactly 1 parameter, 2 given in %s on line 7 -NULL - -Warning: ReflectionClass::isInstance() expects parameter 1 to be object, int given in %s on line 8 -NULL - -Warning: ReflectionClass::isInstance() expects parameter 1 to be object, float given in %s on line 9 -NULL - -Warning: ReflectionClass::isInstance() expects parameter 1 to be object, bool given in %s on line 10 -NULL - -Warning: ReflectionClass::isInstance() expects parameter 1 to be object, string given in %s on line 11 -NULL - -Warning: ReflectionClass::isInstance() expects parameter 1 to be object, null given in %s on line 12 -NULL diff --git a/ext/reflection/tests/ReflectionObject_isInstantiable_error.phpt b/ext/reflection/tests/ReflectionObject_isInstantiable_error.phpt deleted file mode 100644 index f6d4c9d3d2..0000000000 --- a/ext/reflection/tests/ReflectionObject_isInstantiable_error.phpt +++ /dev/null @@ -1,24 +0,0 @@ ---TEST-- -ReflectionObject::IsInstantiable() - invalid params ---FILE-- -<?php -class privateCtorOld { - private function privateCtorOld() {} - public static function reflectionObjectFactory() { - return new ReflectionObject(new self); - } -} -$reflectionObject = privateCtorOld::reflectionObjectFactory(); - -var_dump($reflectionObject->IsInstantiable('X')); -var_dump($reflectionObject->IsInstantiable(0, null)); - -?> ---EXPECTF-- -Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; privateCtorOld has a deprecated constructor in %s on line %d - -Warning: ReflectionClass::isInstantiable() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::isInstantiable() expects exactly 0 parameters, 2 given in %s on line %d -NULL diff --git a/ext/reflection/tests/ReflectionObject_isInternal_error.phpt b/ext/reflection/tests/ReflectionObject_isInternal_error.phpt deleted file mode 100644 index 996add6cd4..0000000000 --- a/ext/reflection/tests/ReflectionObject_isInternal_error.phpt +++ /dev/null @@ -1,15 +0,0 @@ ---TEST-- -ReflectionObject::isInternal() - invalid params ---FILE-- -<?php - -$r1 = new ReflectionObject(new stdClass); -var_dump($r1->isInternal('X')); -var_dump($r1->isInternal('X', true)); -?> ---EXPECTF-- -Warning: ReflectionClass::isInternal() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::isInternal() expects exactly 0 parameters, 2 given in %s on line %d -NULL diff --git a/ext/reflection/tests/ReflectionObject_isUserDefined_error.phpt b/ext/reflection/tests/ReflectionObject_isUserDefined_error.phpt deleted file mode 100644 index 06be47ae67..0000000000 --- a/ext/reflection/tests/ReflectionObject_isUserDefined_error.phpt +++ /dev/null @@ -1,15 +0,0 @@ ---TEST-- -ReflectionObject::isUserDefined() - invalid params ---FILE-- -<?php -$r1 = new ReflectionObject(new stdClass); - -var_dump($r1->isUserDefined('X')); -var_dump($r1->isUserDefined('X', true)); -?> ---EXPECTF-- -Warning: ReflectionClass::isUserDefined() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionClass::isUserDefined() expects exactly 0 parameters, 2 given in %s on line %d -NULL |