diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-03-07 10:38:11 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-03-07 15:54:31 +0100 |
commit | c8e10c6119081a7af98bf2103e30fdd6dc791666 (patch) | |
tree | 2963696a3a1f08e118d1c45896376136f36fbb4d | |
parent | 372248d5c22e5caddff9f6401f5b50b5f1a6f86a (diff) | |
download | php-git-c8e10c6119081a7af98bf2103e30fdd6dc791666.tar.gz |
More zpp error/variation test removals
122 files changed, 0 insertions, 5704 deletions
diff --git a/ext/curl/tests/curl_multi_getcontent_error1.phpt b/ext/curl/tests/curl_multi_getcontent_error1.phpt deleted file mode 100644 index 6e23a2902a..0000000000 --- a/ext/curl/tests/curl_multi_getcontent_error1.phpt +++ /dev/null @@ -1,51 +0,0 @@ ---TEST-- -Curl_multi_getcontent() error test ---CREDITS-- -Rein Velt (rein@velt.org) -#TestFest Utrecht 20090509 ---SKIPIF-- -<?php -if (!extension_loaded('curl')) print 'skip'; -?> ---FILE-- -<?php - //CURL_MULTI_GETCONTENT TEST - - //CREATE RESOURCES - $ch1=curl_init(); - $ch2=curl_init(); - - //SET URL AND OTHER OPTIONS - curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata1.txt"); - curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata2.txt"); - curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true); - - //CREATE MULTIPLE CURL HANDLE - $mh=curl_multi_init(); - - //ADD THE 2 HANDLES - curl_multi_add_handle($mh,$ch1); - curl_multi_add_handle($mh,$ch2); - - //EXECUTE - $running=0; - do { - curl_multi_exec($mh,$running); - } while ($running>0); - - $results1=curl_multi_getcontent(); //no parameter - $results2=curl_multi_getcontent($ch2); - - //CLOSE - curl_multi_remove_handle($mh,$ch1); - curl_multi_remove_handle($mh,$ch2); - curl_multi_close($mh); - - echo $results1; - echo $results2; - -?> ---EXPECTF-- -Warning: curl_multi_getcontent() expects exactly 1 parameter, 0 given in %s on line %d -CURL2 diff --git a/ext/curl/tests/curl_multi_getcontent_error2.phpt b/ext/curl/tests/curl_multi_getcontent_error2.phpt deleted file mode 100644 index 1c8fa67663..0000000000 --- a/ext/curl/tests/curl_multi_getcontent_error2.phpt +++ /dev/null @@ -1,51 +0,0 @@ ---TEST-- -Curl_multi_getcontent() error test ---CREDITS-- -Rein Velt (rein@velt.org) -#TestFest Utrecht 20090509 ---SKIPIF-- -<?php -if (!extension_loaded('curl')) print 'skip'; -?> ---FILE-- -<?php - //CURL_MULTI_GETCONTENT TEST - - //CREATE RESOURCES - $ch1=curl_init(); - $ch2=curl_init(); - - //SET URL AND OTHER OPTIONS - curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata1.txt"); - curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata2.txt"); - curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true); - - //CREATE MULTIPLE CURL HANDLE - $mh=curl_multi_init(); - - //ADD THE 2 HANDLES - curl_multi_add_handle($mh,$ch1); - curl_multi_add_handle($mh,$ch2); - - //EXECUTE - $running=0; - do { - curl_multi_exec($mh,$running); - } while ($running>0); - - $results1=curl_multi_getcontent($ch1,$ch2); //no parameter - $results2=curl_multi_getcontent($ch2); - - //CLOSE - curl_multi_remove_handle($mh,$ch1); - curl_multi_remove_handle($mh,$ch2); - curl_multi_close($mh); - - echo $results1; - echo $results2; - -?> ---EXPECTF-- -Warning: curl_multi_getcontent() expects exactly 1 parameter, 2 given in %s on line %d -CURL2 diff --git a/ext/curl/tests/curl_multi_getcontent_error3.phpt b/ext/curl/tests/curl_multi_getcontent_error3.phpt deleted file mode 100644 index 0de4d03727..0000000000 --- a/ext/curl/tests/curl_multi_getcontent_error3.phpt +++ /dev/null @@ -1,53 +0,0 @@ ---TEST-- -Curl_multi_getcontent() error test ---CREDITS-- -Rein Velt (rein@velt.org) -#TestFest Utrecht 20090509 ---SKIPIF-- -<?php -if (!extension_loaded('curl')) print 'skip'; -?> ---FILE-- -<?php - //CURL_MULTI_GETCONTENT TEST - - //CREATE RESOURCES - $ch1=curl_init(); - $ch2=curl_init(); - - //SET URL AND OTHER OPTIONS - curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata1.txt"); - curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata2.txt"); - curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true); - - //CREATE MULTIPLE CURL HANDLE - $mh=curl_multi_init(); - - //ADD THE 2 HANDLES - curl_multi_add_handle($mh,$ch1); - curl_multi_add_handle($mh,$ch2); - - //EXECUTE - $running=0; - do { - curl_multi_exec($mh,$running); - } while ($running>0); - - $ch1="string"; - - $results1=curl_multi_getcontent($ch1); //incorrect parameter type - $results2=curl_multi_getcontent($ch2); - - //CLOSE - //curl_multi_remove_handle($mh,$ch1); - curl_multi_remove_handle($mh,$ch2); - curl_multi_close($mh); - - echo $results1; - echo $results2; - -?> ---EXPECTF-- -Warning: curl_multi_getcontent() expects parameter 1 to be resource, string given in %s on line %d -CURL2 diff --git a/ext/curl/tests/curl_multi_getcontent_error4.phpt b/ext/curl/tests/curl_multi_getcontent_error4.phpt deleted file mode 100644 index 292766700e..0000000000 --- a/ext/curl/tests/curl_multi_getcontent_error4.phpt +++ /dev/null @@ -1,66 +0,0 @@ ---TEST-- -Curl_multi_getcontent() error test with undefined handle ---CREDITS-- -Rein Velt (rein@velt.org) -#TestFest Utrecht 20090509 ---SKIPIF-- -<?php -if (!extension_loaded('curl')) print 'skip'; -?> ---FILE-- -<?php - //CURL_MULTI_GETCONTENT TEST - - //CREATE RESOURCES - //$ch1=undefined; - $ch2=curl_init(); - - //SET URL AND OTHER OPTIONS - curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata1.txt"); - curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata2.txt"); - curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true); - - //CREATE MULTIPLE CURL HANDLE - $mh=curl_multi_init(); - - //ADD THE 2 HANDLES - curl_multi_add_handle($mh,$ch1); - curl_multi_add_handle($mh,$ch2); - - //EXECUTE - $running=0; - do { - curl_multi_exec($mh,$running); - } while ($running>0); - - - $results1=curl_multi_getcontent($ch1); //incorrect parameter type - $results2=curl_multi_getcontent($ch2); - - //CLOSE - //curl_multi_remove_handle($mh,$ch1); - curl_multi_remove_handle($mh,$ch2); - curl_multi_close($mh); - - echo $results1; - echo $results2; - -?> ---EXPECTF-- -Notice: Undefined variable: ch1 in %s on line %d - -Warning: curl_setopt() expects parameter 1 to be resource, null given in %s on line %d - -Notice: Undefined variable: ch1 in %s on line %d - -Warning: curl_setopt() expects parameter 1 to be resource, null given in %s on line %d - -Notice: Undefined variable: ch1 in %s on line %d - -Warning: curl_multi_add_handle() expects parameter 2 to be resource, null given in %s on line %d - -Notice: Undefined variable: ch1 in %s on line %d - -Warning: curl_multi_getcontent() expects parameter 1 to be resource, null given in %s on line %d -CURL2 diff --git a/ext/curl/tests/curl_multi_init_param.phpt b/ext/curl/tests/curl_multi_init_param.phpt deleted file mode 100644 index e7848976aa..0000000000 --- a/ext/curl/tests/curl_multi_init_param.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -Test curl_multi_init() fail if any parameter is passed ---CREDITS-- -Paulo Eduardo <pauloelr [at] gmail [dot] com> -#testfest SP 2014 ---SKIPIF-- -<?php if (!extension_loaded("curl")) print "skip"; ?> ---FILE-- -<?php -/* Prototype : resource curl_multi_init(void) - * Description : Returns a new cURL multi handle - * Source code : ext/curl/multi.c - * Test documentation: http://wiki.php.net/qa/temp/ext/curl - */ - -// start testing - -//create the multiple cURL handle -$mh = curl_multi_init('test'); -var_dump($mh); - -?> -===DONE=== ---EXPECTF-- -Warning: curl_multi_init() expects exactly 0 parameters, %d given in %s on line %d -NULL -===DONE=== diff --git a/ext/curl/tests/curl_version_error.phpt b/ext/curl/tests/curl_version_error.phpt deleted file mode 100644 index 39f99a0fad..0000000000 --- a/ext/curl/tests/curl_version_error.phpt +++ /dev/null @@ -1,28 +0,0 @@ ---TEST-- -Test curl_version() function : error conditions ---SKIPIF-- -<?php if (!extension_loaded("curl")) exit("skip curl extension not loaded"); ?> ---FILE-- -<?php - -/* Prototype : array curl_version ([ int $age ] ) - * Description: Returns information about the cURL version. - * Source code: ext/curl/interface.c -*/ - -echo "*** Testing curl_version() : error conditions ***\n"; - -echo "\n-- Testing curl_version() function with more than expected no. of arguments --\n"; -$extra_arg = 10; -var_dump( curl_version(1, $extra_arg) ); - -?> -===Done=== ---EXPECTF-- -*** Testing curl_version() : error conditions *** - --- Testing curl_version() function with more than expected no. of arguments -- - -Warning: curl_version() expects at most 1 parameter, 2 given in %s on line %d -NULL -===Done=== diff --git a/ext/fileinfo/tests/finfo_buffer_error.phpt b/ext/fileinfo/tests/finfo_buffer_error.phpt deleted file mode 100644 index 3e74d71ef9..0000000000 --- a/ext/fileinfo/tests/finfo_buffer_error.phpt +++ /dev/null @@ -1,45 +0,0 @@ ---TEST-- -Test finfo_buffer() function : error conditions ---SKIPIF-- -<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> ---FILE-- -<?php -/* Prototype : string finfo_buffer(resource finfo, char *string [, int options [, resource context]]) - * Description: Return infromation about a string buffer. - * Source code: ext/fileinfo/fileinfo.c - * Alias to functions: - */ - -$magicFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'magic'; - -echo "*** Testing finfo_buffer() : error conditions ***\n"; - -$finfo = finfo_open( FILEINFO_NONE, $magicFile ); - -//Test finfo_buffer with one more than the expected number of arguments -echo "\n-- Testing finfo_buffer() function with more than expected no. of arguments --\n"; - -$context = stream_context_get_default(); -$extra_arg = 10; -var_dump( finfo_buffer($finfo, "foobar", FILEINFO_MIME, $context, $extra_arg) ); - -// Testing finfo_buffer with one less than the expected number of arguments -echo "\n-- Testing finfo_buffer() function with less than expected no. of arguments --\n"; - -var_dump( finfo_buffer($finfo) ); - -?> -===DONE=== ---EXPECTF-- -*** Testing finfo_buffer() : error conditions *** - --- Testing finfo_buffer() function with more than expected no. of arguments -- - -Warning: finfo_buffer() expects at most 4 parameters, 5 given in %s on line %d -bool(false) - --- Testing finfo_buffer() function with less than expected no. of arguments -- - -Warning: finfo_buffer() expects at least 2 parameters, 1 given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/gettext/tests/gettext_bind_textdomain_codeset-wrongparams.phpt b/ext/gettext/tests/gettext_bind_textdomain_codeset-wrongparams.phpt deleted file mode 100644 index 2feb2b2c28..0000000000 --- a/ext/gettext/tests/gettext_bind_textdomain_codeset-wrongparams.phpt +++ /dev/null @@ -1,23 +0,0 @@ ---TEST-- -test if bind_textdomain_codeset() fails on wrong param count ---SKIPIF-- -<?php - if (!extension_loaded("gettext")) { - die("skip"); - } -?> ---FILE-- -<?php - bind_textdomain_codeset('messages'); - bind_textdomain_codeset('messages','foo','bar'); - - echo "Done\n"; -?> ---EXPECTF-- -Warning: bind_textdomain_codeset() expects exactly 2 parameters, 1 given in %s on line %d - -Warning: bind_textdomain_codeset() expects exactly 2 parameters, 3 given in %s on line %d -Done ---CREDITS-- -Florian Holzhauer fh-pt@fholzhauer.de -PHP Testfest Berlin 2009-05-09 diff --git a/ext/gettext/tests/gettext_bindtextdomain-wrongparams.phpt b/ext/gettext/tests/gettext_bindtextdomain-wrongparams.phpt deleted file mode 100644 index 1c9fb26194..0000000000 --- a/ext/gettext/tests/gettext_bindtextdomain-wrongparams.phpt +++ /dev/null @@ -1,19 +0,0 @@ ---TEST-- -Test if bindtextdomain() errors if you don't supply enough parameters. ---SKIPIF-- -<?php -if (!extension_loaded("gettext")) { - die("skip gettext extension is not loaded.\n"); -} ---FILE-- -<?php -chdir(dirname(__FILE__)); -bindtextdomain('foobar'); -bindtextdomain(); ---EXPECTF-- -Warning: bindtextdomain() expects exactly 2 parameters, 1 given in %s on line %d - -Warning: bindtextdomain() expects exactly 2 parameters, 0 given in %s on line %d ---CREDITS-- -Till Klampaeckel, till@php.net -PHP Testfest Berlin 2009-05-09 diff --git a/ext/gettext/tests/gettext_dcgettext-wrongparams.phpt b/ext/gettext/tests/gettext_dcgettext-wrongparams.phpt deleted file mode 100644 index c5e8f02622..0000000000 --- a/ext/gettext/tests/gettext_dcgettext-wrongparams.phpt +++ /dev/null @@ -1,16 +0,0 @@ ---TEST-- -Test if dcgettext() errors when you don't supply the correct params. ---SKIPIF-- -<?php -if (!extension_loaded("gettext")) { - die("skip gettext extension is not loaded.\n"); -} ---FILE-- -<?php -var_dump(dcgettext('a', 'b')); ---EXPECTF-- -Warning: dcgettext() expects exactly 3 parameters, 2 given in %s on line %d -NULL ---CREDITS-- -Christian Weiske, cweiske@php.net -PHP Testfest Berlin 2009-05-09 diff --git a/ext/gettext/tests/gettext_dgettext_error_wrongparams.phpt b/ext/gettext/tests/gettext_dgettext_error_wrongparams.phpt deleted file mode 100644 index b28072b7ea..0000000000 --- a/ext/gettext/tests/gettext_dgettext_error_wrongparams.phpt +++ /dev/null @@ -1,34 +0,0 @@ ---TEST-- -Check how dgettext() with wrong parameter types and wrong parameter cou types and wrong parameter count behaves. ---SKIPIF-- -<?php - if (!extension_loaded("gettext")) { - die("skip extension gettext not loaded\n"); - } - if (!setlocale(LC_ALL, 'en_US.UTF-8')) { - die("skip en_US.UTF-8 locale not supported."); - } - -?> ---FILE-- -<?php - chdir(dirname(__FILE__)); - setlocale(LC_ALL, 'en_US.UTF-8'); - dgettext ('foo'); - dgettext (); - - dgettext(array(), 'foo'); - dgettext('foo', array()); - -?> ---EXPECTF-- -Warning: dgettext() expects exactly 2 parameters, 1 given in %s.php on line %d - -Warning: dgettext() expects exactly 2 parameters, 0 given in %s.php on line %d - -Warning: dgettext() expects parameter 1 to be string, array given in %s.php on line %d - -Warning: dgettext() expects parameter 2 to be string, array given in %s.php on line %d ---CREDITS-- -Moritz Neuhaeuser, info@xcompile.net -PHP Testfest Berlin 2009-05-09 diff --git a/ext/gettext/tests/gettext_dngettext-wrongparams.phpt b/ext/gettext/tests/gettext_dngettext-wrongparams.phpt deleted file mode 100644 index 787b0b3af3..0000000000 --- a/ext/gettext/tests/gettext_dngettext-wrongparams.phpt +++ /dev/null @@ -1,23 +0,0 @@ ---TEST-- -Test if dngettext() errors when you don't supply the correct params. ---SKIPIF-- -<?php -if (!extension_loaded("gettext")) { - die("skip gettext extension is not loaded.\n"); -} -if (!setlocale(LC_ALL, 'en_US.UTF-8')) { - die("skip en_US.UTF-8 locale not supported."); -} ---FILE-- -<?php -chdir(dirname(__FILE__)); -setlocale(LC_ALL, 'en_US.UTF-8'); -bindtextdomain('dngettextTest', './locale'); - -var_dump(dngettext('dngettextTest', 'item', 'items')); ---EXPECTF-- -Warning: dngettext() expects exactly 4 parameters, 3 given in %s on line %d -NULL ---CREDITS-- -Till Klampaeckel, till@php.net -PHP Testfest Berlin 2009-05-09 diff --git a/ext/gettext/tests/gettext_gettext_error_wrongparams.phpt b/ext/gettext/tests/gettext_gettext_error_wrongparams.phpt deleted file mode 100644 index 418cdff5e2..0000000000 --- a/ext/gettext/tests/gettext_gettext_error_wrongparams.phpt +++ /dev/null @@ -1,17 +0,0 @@ ---TEST-- -Check how gettext() with wrong parameters behaves. ---SKIPIF-- -<?php - if (!extension_loaded("gettext")) { - die("skip extension gettext not loaded\n"); - } -?> ---FILE-- -<?php -gettext (array()); -?> ---EXPECTF-- -Warning: gettext() expects parameter 1 to be string, array given in %s on line 2 ---CREDITS-- -Moritz Neuhaeuser, info@xcompile.net -PHP Testfest Berlin 2009-05-09 diff --git a/ext/gettext/tests/gettext_ngettext-wrongparams.phpt b/ext/gettext/tests/gettext_ngettext-wrongparams.phpt deleted file mode 100644 index aac6c8b7f6..0000000000 --- a/ext/gettext/tests/gettext_ngettext-wrongparams.phpt +++ /dev/null @@ -1,33 +0,0 @@ ---TEST-- -Check how ngettext() with wrong parameters behaves. ---SKIPIF-- -<?php - if (!extension_loaded("gettext")) { - die("SKIP extension gettext not loaded\n"); - } - -?> ---FILE-- -<?php -ngettext(array(), "", 1); -ngettext("", array(), 1); -ngettext("", "", array()); -ngettext(); -ngettext(""); -ngettext("", ""); -?> ---EXPECTF-- -Warning: ngettext() expects parameter 1 to be string, array given in %s on line 2 - -Warning: ngettext() expects parameter 2 to be string, array given in %s on line 3 - -Warning: ngettext() expects parameter 3 to be int, array given in %s on line 4 - -Warning: ngettext() expects exactly 3 parameters, 0 given in %s on line 5 - -Warning: ngettext() expects exactly 3 parameters, 1 given in %s on line 6 - -Warning: ngettext() expects exactly 3 parameters, 2 given in %s on line 7 ---CREDITS-- -Tim Eggert, tim@elbart.com -PHP Testfest Berlin 2009-05-09 diff --git a/ext/gettext/tests/gettext_textdomain-wrongparams.phpt b/ext/gettext/tests/gettext_textdomain-wrongparams.phpt deleted file mode 100644 index e563e7b210..0000000000 --- a/ext/gettext/tests/gettext_textdomain-wrongparams.phpt +++ /dev/null @@ -1,25 +0,0 @@ ---TEST-- -Check how textdomain() with wrong parameters behaves. ---SKIPIF-- -<?php - if (!extension_loaded("gettext")) { - die("skip\n"); - } - if (!setlocale(LC_ALL, 'en_US.UTF-8')) { - die("skip en_US.UTF-8 locale not supported."); - } -?> ---FILE-- -<?php - -chdir(dirname(__FILE__)); -setlocale(LC_ALL, 'en_US.UTF-8'); -bindtextdomain ("messages", "./locale"); -textdomain (array()); - -?> ---EXPECTF-- -Warning: textdomain() expects parameter 1 to be string, array given in %s on line 6 ---CREDITS-- -Christian Weiske, cweiske@php.net -PHP Testfest Berlin 2009-05-09 diff --git a/ext/json/tests/json_encode_error.phpt b/ext/json/tests/json_encode_error.phpt deleted file mode 100644 index defc7b474c..0000000000 --- a/ext/json/tests/json_encode_error.phpt +++ /dev/null @@ -1,28 +0,0 @@ ---TEST-- -Test json_encode() function : error conditions ---SKIPIF-- -<?php if (!extension_loaded("json")) print "skip"; ?> ---FILE-- -<?php -echo "*** Testing json_encode() : error conditions ***\n"; - -echo "\n-- Testing json_encode() function with no arguments --\n"; -var_dump(json_encode()); - -echo "\n-- Testing json_encode() function with more than expected no. of arguments --\n"; -$extra_arg = 10; -var_dump(json_encode("abc", 0, $extra_arg)); - -?> -===Done=== ---EXPECTF-- -*** Testing json_encode() : error conditions *** - --- Testing json_encode() function with no arguments -- - -Warning: json_encode() expects at least 1 parameter, 0 given in %s on line %d -NULL - --- Testing json_encode() function with more than expected no. of arguments -- -string(5) ""abc"" -===Done=== diff --git a/ext/phar/tests/phar_buildfromdirectory3.phpt b/ext/phar/tests/phar_buildfromdirectory3.phpt deleted file mode 100644 index ba2103a757..0000000000 --- a/ext/phar/tests/phar_buildfromdirectory3.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -Phar::buildFromDirectory() - object passed as second parameter ---SKIPIF-- -<?php if (!extension_loaded("phar")) die("skip"); ?> ---INI-- -phar.require_hash=0 -phar.readonly=0 ---FILE-- -<?php - -try { - $phar = new Phar(dirname(__FILE__) . '/buildfromdirectory3.phar'); - $phar->buildFromDirectory('files', new stdClass); -} catch (Exception $e) { - var_dump(get_class($e)); - echo $e->getMessage() . "\n"; -} -?> -===DONE=== ---CLEAN-- -<?php -unlink(dirname(__FILE__) . '/buildfromdirectory3.phar'); -__HALT_COMPILER(); -?> ---EXPECTF-- -Warning: Phar::buildFromDirectory() expects parameter 2 to be %string, object given in %sphar_buildfromdirectory3.php on line %d -===DONE=== diff --git a/ext/phar/tests/phar_buildfromiterator2.phpt b/ext/phar/tests/phar_buildfromiterator2.phpt deleted file mode 100644 index c6669e0555..0000000000 --- a/ext/phar/tests/phar_buildfromiterator2.phpt +++ /dev/null @@ -1,26 +0,0 @@ ---TEST-- -Phar::buildFromIterator() wrong object ---SKIPIF-- -<?php if (!extension_loaded("phar")) die("skip"); ?> ---INI-- -phar.require_hash=0 -phar.readonly=0 ---FILE-- -<?php -try { - $phar = new Phar(dirname(__FILE__) . '/buildfromiterator2.phar'); - $phar->buildFromIterator(new stdClass); -} catch (Exception $e) { - var_dump(get_class($e)); - echo $e->getMessage() . "\n"; -} -?> -===DONE=== ---CLEAN-- -<?php -unlink(dirname(__FILE__) . '/buildfromiterator2.phar'); -__HALT_COMPILER(); -?> ---EXPECTF-- -Warning: Phar::buildFromIterator() expects parameter 1 to be Traversable, object given in %sphar_buildfromiterator2.php on line %d -===DONE=== diff --git a/ext/phar/tests/phar_buildfromiterator3.phpt b/ext/phar/tests/phar_buildfromiterator3.phpt deleted file mode 100644 index 8537fe3ef7..0000000000 --- a/ext/phar/tests/phar_buildfromiterator3.phpt +++ /dev/null @@ -1,54 +0,0 @@ ---TEST-- -Phar::buildFromIterator() iterator, but object passed ---SKIPIF-- -<?php if (!extension_loaded("phar")) die("skip"); ?> ---INI-- -phar.require_hash=0 -phar.readonly=0 ---FILE-- -<?php -class myIterator implements Iterator -{ - var $a; - function __construct(array $a) - { - $this->a = $a; - } - function next() { - echo "next\n"; - return next($this->a); - } - function current() { - echo "current\n"; - return current($this->a); - } - function key() { - echo "key\n"; - return key($this->a); - } - function valid() { - echo "valid\n"; - return current($this->a); - } - function rewind() { - echo "rewind\n"; - return reset($this->a); - } -} -try { - $phar = new Phar(dirname(__FILE__) . '/buildfromiterator3.phar'); - $phar->buildFromIterator(new myIterator(array()), new stdClass); -} catch (Exception $e) { - var_dump(get_class($e)); - echo $e->getMessage() . "\n"; -} -?> -===DONE=== ---CLEAN-- -<?php -unlink(dirname(__FILE__) . '/buildfromiterator3.phar'); -__HALT_COMPILER(); -?> ---EXPECTF-- -Warning: Phar::buildFromIterator() expects parameter 2 to be %string, object given in %sphar_buildfromiterator3.php on line %d -===DONE=== diff --git a/ext/session/tests/session_destroy_error.phpt b/ext/session/tests/session_destroy_error.phpt deleted file mode 100644 index 4c1a293be2..0000000000 --- a/ext/session/tests/session_destroy_error.phpt +++ /dev/null @@ -1,217 +0,0 @@ ---TEST-- -Test session_destroy() function : error functionality ---SKIPIF-- -<?php include('skipif.inc'); ?> ---FILE-- -<?php - -ob_start(); - -/* - * Prototype : bool session_destroy(void) - * Description : Destroys all data registered to a session - * Source code : ext/session/session.c - */ - -echo "*** Testing session_destroy() : error functionality ***\n"; - -// Get an unset variable -$unset_var = 10; -unset($unset_var); - -class classA -{ - public function __toString() { - return "Hello World!"; - } -} - -$heredoc = <<<EOT -Hello World! -EOT; - -$fp = fopen(__FILE__, "r"); - -// Unexpected values to be passed as arguments -$inputs = array( - - // Integer data -/*1*/ 0, - 1, - 12345, - -2345, - - // Float data -/*5*/ 10.5, - -10.5, - 12.3456789000e10, - 12.3456789000E-10, - .5, - - // Null data -/*10*/ NULL, - null, - - // Boolean data -/*12*/ true, - false, - TRUE, - FALSE, - - // Empty strings -/*16*/ "", - '', - - // Invalid string data -/*18*/ "Nothing", - 'Nothing', - $heredoc, - - // Object data -/*21*/ new classA(), - - // Undefined data -/*22*/ @$undefined_var, - - // Unset data -/*23*/ @$unset_var, - - // Resource variable -/*24*/ $fp -); - - -$iterator = 1; -foreach($inputs as $input) { - echo "\n-- Iteration $iterator --\n"; - var_dump(session_destroy($input)); - $iterator++; -}; - -fclose($fp); -echo "Done"; -ob_end_flush(); -?> ---EXPECTF-- -*** Testing session_destroy() : error functionality *** - --- Iteration 1 -- - -Warning: session_destroy() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 2 -- - -Warning: session_destroy() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 3 -- - -Warning: session_destroy() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 4 -- - -Warning: session_destroy() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 5 -- - -Warning: session_destroy() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 6 -- - -Warning: session_destroy() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 7 -- - -Warning: session_destroy() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 8 -- - -Warning: session_destroy() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 9 -- - -Warning: session_destroy() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 10 -- - -Warning: session_destroy() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 11 -- - -Warning: session_destroy() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 12 -- - -Warning: session_destroy() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 13 -- - -Warning: session_destroy() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 14 -- - -Warning: session_destroy() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 15 -- - -Warning: session_destroy() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 16 -- - -Warning: session_destroy() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 17 -- - -Warning: session_destroy() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: session_destroy() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: session_destroy() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: session_destroy() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: session_destroy() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: session_destroy() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: session_destroy() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 24 -- - -Warning: session_destroy() expects exactly 0 parameters, 1 given in %s on line %d -NULL -Done diff --git a/ext/session/tests/session_set_cookie_params_error.phpt b/ext/session/tests/session_set_cookie_params_error.phpt deleted file mode 100644 index 518c5abf89..0000000000 --- a/ext/session/tests/session_set_cookie_params_error.phpt +++ /dev/null @@ -1,309 +0,0 @@ ---TEST-- -Test session_set_cookie_params() function : error functionality ---SKIPIF-- -<?php include('skipif.inc'); ?> ---FILE-- -<?php - -ob_start(); - -/* - * Prototype : void session_set_cookie_params(int $lifetime [, string $path [, string $domain [, bool $secure [, bool $httponly]]]]) - * Description : Set the session cookie parameters - * Source code : ext/session/session.c - */ - -echo "*** Testing session_set_cookie_params() : error functionality ***\n"; - -// Get an unset variable -$unset_var = 10; -unset($unset_var); - -class classA -{ - public function __toString() { - return "Hello World!"; - } -} - -$heredoc = <<<EOT -Hello World! -EOT; - -$fp = fopen(__FILE__, "r"); - -// Unexpected values to be passed as arguments -$inputs = array( - - // Integer data -/*1*/ 0, - 1, - 12345, - -2345, - - // Float data -/*5*/ 10.5, - -10.5, - 12.3456789000e10, - 12.3456789000E-10, - .5, - - // Null data -/*10*/ NULL, - null, - - // Boolean data -/*12*/ true, - false, - TRUE, - FALSE, - - // Empty strings -/*16*/ "", - '', - - // Invalid string data -/*18*/ "Nothing", - 'Nothing', - $heredoc, - - // Object data -/*21*/ new classA(), - - // Undefined data -/*22*/ @$undefined_var, - - // Unset data -/*23*/ @$unset_var, - - // Resource variable -/*24*/ $fp -); - -$iterator = 1; -foreach($inputs as $input) { - echo "\n-- Iteration $iterator --\n"; - var_dump(session_set_cookie_params($input)); - var_dump(session_set_cookie_params(1234567890, $input)); - var_dump(session_set_cookie_params(1234567890, "blah", $input)); - var_dump(session_set_cookie_params(1234567890, "blah", "foo", $input)); - var_dump(session_set_cookie_params(1234567890, "blah", "foo", TRUE, $input)); - var_dump(session_set_cookie_params(1234567890, "blah", "foo", TRUE, FALSE)); - $iterator++; -}; - -fclose($fp); -echo "Done"; -ob_end_flush(); -?> ---EXPECTF-- -*** Testing session_set_cookie_params() : error functionality *** - --- Iteration 1 -- -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) - --- Iteration 2 -- -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) - --- Iteration 3 -- -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) - --- Iteration 4 -- - -Warning: session_set_cookie_params(): CookieLifetime cannot be negative in %s on line 81 -bool(false) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) - --- Iteration 5 -- -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) - --- Iteration 6 -- - -Warning: session_set_cookie_params(): CookieLifetime cannot be negative in %s on line 81 -bool(false) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) - --- Iteration 7 -- -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) - --- Iteration 8 -- -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) - --- Iteration 9 -- -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) - --- Iteration 10 -- -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) - --- Iteration 11 -- -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) - --- Iteration 12 -- -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) - --- Iteration 13 -- -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) - --- Iteration 14 -- -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) - --- Iteration 15 -- -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) - --- Iteration 16 -- -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) - --- Iteration 17 -- -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) - --- Iteration 18 -- -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) - --- Iteration 19 -- -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) - --- Iteration 20 -- -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) - --- Iteration 21 -- -bool(true) -bool(true) -bool(true) - -Warning: session_set_cookie_params() expects parameter 4 to be bool, object given in %s on line 84 -NULL - -Warning: session_set_cookie_params() expects parameter 5 to be bool, object given in %s on line 85 -NULL -bool(true) - --- Iteration 22 -- -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) - --- Iteration 23 -- -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) - --- Iteration 24 -- -bool(true) - -Warning: session_set_cookie_params() expects parameter 2 to be string, resource given in %s on line 82 -NULL - -Warning: session_set_cookie_params() expects parameter 3 to be string, resource given in %s on line 83 -NULL - -Warning: session_set_cookie_params() expects parameter 4 to be bool, resource given in %s on line 84 -NULL - -Warning: session_set_cookie_params() expects parameter 5 to be bool, resource given in %s on line 85 -NULL -bool(true) -Done diff --git a/ext/sockets/tests/socket_create_listen_params.phpt b/ext/sockets/tests/socket_create_listen_params.phpt deleted file mode 100644 index e69de29bb2..0000000000 --- a/ext/sockets/tests/socket_create_listen_params.phpt +++ /dev/null diff --git a/ext/standard/tests/array/array_filter_error.phpt b/ext/standard/tests/array/array_filter_error.phpt deleted file mode 100644 index 14fb78fb12..0000000000 --- a/ext/standard/tests/array/array_filter_error.phpt +++ /dev/null @@ -1,50 +0,0 @@ ---TEST-- -Test array_filter() function : error conditions ---FILE-- -<?php -/* Prototype : array array_filter(array $input [, callback $callback]) - * Description: Filters elements from the array via the callback. - * Source code: ext/standard/array.c -*/ - -echo "*** Testing array_filter() : error conditions ***\n"; - -// zero arguments -echo "-- Testing array_filter() function with Zero arguments --"; -var_dump( array_filter() ); - -$input = array(0, 1, 2, 3, 5); -/* callback function - * Prototype : bool odd(array $input) - * Parameters : $input - array for which each elements should be checked into the function - * Return Type : bool - true if element is odd and returns false otherwise - * Description : Function takes array as input and checks for its each elements. -*/ -function odd($input) -{ - return ($input % 2 != 0); -} -$extra_arg = 10; - -// with one more than the expected number of arguments -echo "-- Testing array_filter() function with more than expected no. of arguments --"; -var_dump( array_filter($input, "odd", $extra_arg, $extra_arg) ); - -// with incorrect callback function -echo "-- Testing array_filter() function with incorrect callback --"; -var_dump( array_filter($input, "even") ); - -echo "Done" -?> ---EXPECTF-- -*** Testing array_filter() : error conditions *** --- Testing array_filter() function with Zero arguments -- -Warning: array_filter() expects at least 1 parameter, 0 given in %s on line %d -NULL --- Testing array_filter() function with more than expected no. of arguments -- -Warning: array_filter() expects at most 3 parameters, 4 given in %s on line %d -NULL --- Testing array_filter() function with incorrect callback -- -Warning: array_filter() expects parameter 2 to be a valid callback, function 'even' not found or invalid function name in %s on line %d -NULL -Done diff --git a/ext/standard/tests/array/array_pad_error.phpt b/ext/standard/tests/array/array_pad_error.phpt deleted file mode 100644 index d0dc9ccb7f..0000000000 --- a/ext/standard/tests/array/array_pad_error.phpt +++ /dev/null @@ -1,53 +0,0 @@ ---TEST-- -Test array_pad() function : error conditions ---FILE-- -<?php -/* Prototype : array array_pad(array $input, int $pad_size, mixed $pad_value) - * Description: Returns a copy of input array padded with pad_value to size pad_size - * Source code: ext/standard/array.c -*/ - -echo "*** Testing array_pad() : error conditions ***\n"; - -// Zero arguments -echo "\n-- Testing array_pad() function with Zero arguments --\n"; -var_dump( array_pad() ); - -//Test array_pad with one more than the expected number of arguments -echo "\n-- Testing array_pad() function with more than expected no. of arguments --\n"; -$input = array(1, 2); -$pad_size = 10; -$pad_value = 1; -$extra_arg = 10; -var_dump( array_pad($input, $pad_size, $pad_value, $extra_arg) ); - -// Testing array_pad with less than the expected number of arguments -echo "\n-- Testing array_pad() function with less than expected no. of arguments --\n"; -$input = array(1, 2); -$pad_size = 10; -var_dump( array_pad($input, $pad_size) ); -var_dump( array_pad($input) ); - -echo "Done"; -?> ---EXPECTF-- -*** Testing array_pad() : error conditions *** - --- Testing array_pad() function with Zero arguments -- - -Warning: array_pad() expects exactly 3 parameters, 0 given in %s on line %d -NULL - --- Testing array_pad() function with more than expected no. of arguments -- - -Warning: array_pad() expects exactly 3 parameters, 4 given in %s on line %d -NULL - --- Testing array_pad() function with less than expected no. of arguments -- - -Warning: array_pad() expects exactly 3 parameters, 2 given in %s on line %d -NULL - -Warning: array_pad() expects exactly 3 parameters, 1 given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/array/array_search_errors.phpt b/ext/standard/tests/array/array_search_errors.phpt deleted file mode 100644 index 90502b2f53..0000000000 --- a/ext/standard/tests/array/array_search_errors.phpt +++ /dev/null @@ -1,44 +0,0 @@ ---TEST-- -Test array_search() function - error conditions ---FILE-- -<?php -/* - * Prototype : mixed array_search ( mixed $needle, array $haystack [, bool $strict] ) - * Description: Searches haystack for needle and returns the key if it is found in the array, FALSE otherwise - * Source Code: ext/standard/array.c -*/ - -echo "*** Testing error conditions of array_search() ***\n"; -/* zero argument */ -var_dump( array_search() ); - -/* unexpected no.of arguments in array_search() */ -$var = array("mon", "tues", "wed", "thurs"); -var_dump( array_search(1, $var, 0, "test") ); -var_dump( array_search("test") ); - -/* unexpected second argument in array_search() */ -$var="test"; -var_dump( array_search("test", $var) ); -var_dump( array_search(1, 123) ); - -echo "Done\n"; -?> ---EXPECTF-- -*** Testing error conditions of array_search() *** - -Warning: array_search() expects at least 2 parameters, 0 given in %s on line %d -NULL - -Warning: array_search() expects at most 3 parameters, 4 given in %s on line %d -NULL - -Warning: array_search() expects at least 2 parameters, 1 given in %s on line %d -NULL - -Warning: array_search() expects parameter 2 to be array, string given in %s on line %d -NULL - -Warning: array_search() expects parameter 2 to be array, int given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/array/array_unshift_error.phpt b/ext/standard/tests/array/array_unshift_error.phpt deleted file mode 100644 index d37abb22e0..0000000000 --- a/ext/standard/tests/array/array_unshift_error.phpt +++ /dev/null @@ -1,24 +0,0 @@ ---TEST-- -Test array_unshift() function : error conditions ---FILE-- -<?php -/* Prototype : int array_unshift(array $array[, mixed ...]) - * Description: Pushes elements onto the beginning of the array - * Source code: ext/standard/array.c -*/ - -echo "*** Testing array_unshift() : error conditions ***\n"; - -// Zero arguments -echo "\n-- Testing array_unshift() function with Zero arguments --\n"; -var_dump( array_unshift() ); -echo "Done"; -?> ---EXPECTF-- -*** Testing array_unshift() : error conditions *** - --- Testing array_unshift() function with Zero arguments -- - -Warning: array_unshift() expects at least 1 parameter, 0 given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/class_object/class_exists_error_001.phpt b/ext/standard/tests/class_object/class_exists_error_001.phpt deleted file mode 100644 index 0c9a121470..0000000000 --- a/ext/standard/tests/class_object/class_exists_error_001.phpt +++ /dev/null @@ -1,42 +0,0 @@ ---TEST-- -Test class_exists() function : error conditions (wrong number of arguments) ---FILE-- -<?php -/* Prototype : proto bool class_exists(string classname [, bool autoload]) - * Description: Checks if the class exists - * Source code: Zend/zend_builtin_functions.c - * Alias to functions: - */ - -/** - * Test wrong number of arguments - */ - -echo "*** Testing class_exists() : error conditions ***\n"; - -// Zero arguments -echo "\n-- Testing class_exists() function with Zero arguments --\n"; -var_dump( class_exists() ); - -//Test class_exists with one more than the expected number of arguments -echo "\n-- Testing class_exists() function with more than expected no. of arguments --\n"; -$classname = 'string_val'; -$autoload = true; -$extra_arg = 10; -var_dump( class_exists($classname, $autoload, $extra_arg) ); - -echo "Done"; -?> ---EXPECTF-- -*** Testing class_exists() : error conditions *** - --- Testing class_exists() function with Zero arguments -- - -Warning: class_exists() expects at least 1 parameter, 0 given in %s on line 16 -NULL - --- Testing class_exists() function with more than expected no. of arguments -- - -Warning: class_exists() expects at most 2 parameters, 3 given in %s on line 23 -NULL -Done diff --git a/ext/standard/tests/class_object/get_class_error_001.phpt b/ext/standard/tests/class_object/get_class_error_001.phpt deleted file mode 100644 index 09c46dad2f..0000000000 --- a/ext/standard/tests/class_object/get_class_error_001.phpt +++ /dev/null @@ -1,28 +0,0 @@ ---TEST-- -Test get_class() function : error conditions - wrong number of arguments. ---FILE-- -<?php -/* Prototype : proto string get_class([object object]) - * Description: Retrieves the class name - * Source code: Zend/zend_builtin_functions.c - * Alias to functions: - */ - -echo "*** Testing get_class() : error conditions ***\n"; - -//Test get_class with one more than the expected number of arguments -echo "\n-- Testing get_class() function with more than expected no. of arguments --\n"; -$object = new stdclass(); -$extra_arg = 10; -var_dump( get_class($object, $extra_arg) ); - -echo "Done"; -?> ---EXPECTF-- -*** Testing get_class() : error conditions *** - --- Testing get_class() function with more than expected no. of arguments -- - -Warning: get_class() expects at most 1 parameter, 2 given in %s on line 14 -bool(false) -Done diff --git a/ext/standard/tests/class_object/get_class_methods_error_001.phpt b/ext/standard/tests/class_object/get_class_methods_error_001.phpt deleted file mode 100644 index ed3db7468d..0000000000 --- a/ext/standard/tests/class_object/get_class_methods_error_001.phpt +++ /dev/null @@ -1,41 +0,0 @@ ---TEST-- -Test get_class_methods() function : error conditions ---FILE-- -<?php -/* Prototype : proto array get_class_methods(mixed class) - * Description: Returns an array of method names for class or class instance. - * Source code: Zend/zend_builtin_functions.c - * Alias to functions: - */ - -/* - * Test wrong number of arguments. - */ - -echo "*** Testing get_class_methods() : error conditions ***\n"; - -// Zero arguments -echo "\n-- Testing get_class_methods() function with Zero arguments --\n"; -var_dump( get_class_methods() ); - -//Test get_class_methods with one more than the expected number of arguments -echo "\n-- Testing get_class_methods() function with more than expected no. of arguments --\n"; -$class = 1; -$extra_arg = 10; -var_dump( get_class_methods($class, $extra_arg) ); - -echo "Done"; -?> ---EXPECTF-- -*** Testing get_class_methods() : error conditions *** - --- Testing get_class_methods() function with Zero arguments -- - -Warning: get_class_methods() expects exactly 1 parameter, 0 given in %s on line 16 -NULL - --- Testing get_class_methods() function with more than expected no. of arguments -- - -Warning: get_class_methods() expects exactly 1 parameter, 2 given in %s on line 22 -NULL -Done diff --git a/ext/standard/tests/class_object/get_class_vars_error.phpt b/ext/standard/tests/class_object/get_class_vars_error.phpt deleted file mode 100644 index 8815070ce5..0000000000 --- a/ext/standard/tests/class_object/get_class_vars_error.phpt +++ /dev/null @@ -1,38 +0,0 @@ ---TEST-- -Test get_class_vars() function : error conditions ---FILE-- -<?php -/* Prototype : array get_class_vars(string class_name) - * Description: Returns an array of default properties of the class. - * Source code: Zend/zend_builtin_functions.c - * Alias to functions: - */ - -echo "*** Testing get_class_vars() : error conditions ***\n"; - - -//Test get_class_vars with one more than the expected number of arguments -echo "\n-- Testing get_class_vars() function with more than expected no. of arguments --\n"; -$obj = new stdclass(); -$extra_arg = 10; -var_dump(get_class_vars($obj,$extra_arg) ); - -// Testing get_class_vars with one less than the expected number of arguments -echo "\n-- Testing get_class_vars() function with less than expected no. of arguments --\n"; -var_dump(get_class_vars()); - -?> -===DONE=== ---EXPECTF-- -*** Testing get_class_vars() : error conditions *** - --- Testing get_class_vars() function with more than expected no. of arguments -- - -Warning: get_class_vars() expects exactly 1 parameter, 2 given in %sget_class_vars_error.php on line %d -NULL - --- Testing get_class_vars() function with less than expected no. of arguments -- - -Warning: get_class_vars() expects exactly 1 parameter, 0 given in %sget_class_vars_error.php on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/class_object/get_class_vars_variation1.phpt b/ext/standard/tests/class_object/get_class_vars_variation1.phpt deleted file mode 100644 index 5ade3f240f..0000000000 --- a/ext/standard/tests/class_object/get_class_vars_variation1.phpt +++ /dev/null @@ -1,181 +0,0 @@ ---TEST-- -Test get_class_vars() function : usage variation ---FILE-- -<?php -/* Prototype : array get_class_vars(string class_name) - * Description: Returns an array of default properties of the class. - * Source code: Zend/zend_builtin_functions.c - * Alias to functions: - */ - -echo "*** Testing get_class_vars() : usage variation ***\n"; - -//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 method_name - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( get_class_vars($value) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing get_class_vars() : usage variation *** - ---int 0-- -bool(false) - ---int 1-- -bool(false) - ---int 12345-- -bool(false) - ---int -12345-- -bool(false) - ---float 10.5-- -bool(false) - ---float -10.5-- -bool(false) - ---float 12.3456789000e10-- -bool(false) - ---float -12.3456789000e10-- -bool(false) - ---float .5-- -bool(false) - ---empty array-- - -Warning: get_class_vars() expects parameter 1 to be string, array given in %sget_class_vars_variation1.php on line %d -NULL - ---int indexed array-- - -Warning: get_class_vars() expects parameter 1 to be string, array given in %sget_class_vars_variation1.php on line %d -NULL - ---associative array-- - -Warning: get_class_vars() expects parameter 1 to be string, array given in %sget_class_vars_variation1.php on line %d -NULL - ---nested arrays-- - -Warning: get_class_vars() expects parameter 1 to be string, array given in %sget_class_vars_variation1.php on line %d -NULL - ---uppercase NULL-- -bool(false) - ---lowercase null-- -bool(false) - ---lowercase true-- -bool(false) - ---lowercase false-- -bool(false) - ---uppercase TRUE-- -bool(false) - ---uppercase FALSE-- -bool(false) - ---empty string DQ-- -bool(false) - ---empty string SQ-- -bool(false) - ---instance of classWithToString-- -bool(false) - ---instance of classWithoutToString-- - -Warning: get_class_vars() expects parameter 1 to be string, object given in %sget_class_vars_variation1.php on line %d -NULL - ---undefined var-- -bool(false) - ---unset var-- -bool(false) -===DONE=== diff --git a/ext/standard/tests/class_object/get_declared_classes_error_001.phpt b/ext/standard/tests/class_object/get_declared_classes_error_001.phpt deleted file mode 100644 index 7132410fb8..0000000000 --- a/ext/standard/tests/class_object/get_declared_classes_error_001.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -Test get_declared_classes() function : error conditions ---FILE-- -<?php -/* Prototype : proto array get_declared_classes() - * Description: Returns an array of all declared classes. - * Source code: Zend/zend_builtin_functions.c - * Alias to functions: - */ - -echo "*** Testing get_declared_classes() : error conditions ***\n"; - -// One argument -echo "\n-- Testing get_declared_classes() function with one argument --\n"; -$extra_arg = 10; -var_dump( get_declared_classes($extra_arg) ); - -echo "Done"; -?> ---EXPECTF-- -*** Testing get_declared_classes() : error conditions *** - --- Testing get_declared_classes() function with one argument -- - -Warning: get_declared_classes() expects exactly 0 parameters, 1 given in %s on line 13 -NULL -Done diff --git a/ext/standard/tests/class_object/get_declared_interfaces_error_001.phpt b/ext/standard/tests/class_object/get_declared_interfaces_error_001.phpt deleted file mode 100644 index 1b11981492..0000000000 --- a/ext/standard/tests/class_object/get_declared_interfaces_error_001.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -Test get_declared_interfaces() function : error conditions ---FILE-- -<?php -/* Prototype : proto array get_declared_interfaces() - * Description: Returns an array of all declared interfaces. - * Source code: Zend/zend_builtin_functions.c - * Alias to functions: - */ - -echo "*** Testing get_declared_interfaces() : error conditions ***\n"; - -// One argument -echo "\n-- Testing get_declared_interfaces() function with one argument --\n"; -$extra_arg = 10; -var_dump( get_declared_interfaces($extra_arg) ); - -echo "Done"; -?> ---EXPECTF-- -*** Testing get_declared_interfaces() : error conditions *** - --- Testing get_declared_interfaces() function with one argument -- - -Warning: get_declared_interfaces() expects exactly 0 parameters, 1 given in %s on line 13 -NULL -Done diff --git a/ext/standard/tests/class_object/get_declared_traits_error_001.phpt b/ext/standard/tests/class_object/get_declared_traits_error_001.phpt deleted file mode 100644 index 522ad36a1b..0000000000 --- a/ext/standard/tests/class_object/get_declared_traits_error_001.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -Test get_declared_traits() function : error conditions ---FILE-- -<?php -/* Prototype : proto array get_declared_traits() - * Description: Returns an array of all declared traits. - * Source code: Zend/zend_builtin_functions.c - * Alias to functions: - */ - -echo "*** Testing get_declared_traits() : error conditions ***\n"; - -// One argument -echo "\n-- Testing get_declared_traits() function with one argument --\n"; -$extra_arg = 10; -var_dump( get_declared_traits($extra_arg) ); - -echo "Done"; -?> ---EXPECTF-- -*** Testing get_declared_traits() : error conditions *** - --- Testing get_declared_traits() function with one argument -- - -Warning: get_declared_traits() expects exactly 0 parameters, 1 given in %s on line 13 -NULL -Done diff --git a/ext/standard/tests/class_object/get_object_vars_error_001.phpt b/ext/standard/tests/class_object/get_object_vars_error_001.phpt deleted file mode 100644 index c6488fe5e6..0000000000 --- a/ext/standard/tests/class_object/get_object_vars_error_001.phpt +++ /dev/null @@ -1,37 +0,0 @@ ---TEST-- -Test get_object_vars() function : error conditions - wrong number of args ---FILE-- -<?php -/* Prototype : proto array get_object_vars(object obj) - * Description: Returns an array of object properties - * Source code: Zend/zend_builtin_functions.c - * Alias to functions: - */ - -echo "*** Testing get_object_vars() : error conditions ***\n"; - -// Zero arguments -echo "\n-- Testing get_object_vars() function with Zero arguments --\n"; -var_dump( get_object_vars() ); - -//Test get_object_vars with one more than the expected number of arguments -echo "\n-- Testing get_object_vars() function with more than expected no. of arguments --\n"; -$obj = new stdclass(); -$extra_arg = 10; -var_dump( get_object_vars($obj, $extra_arg) ); - -echo "Done"; -?> ---EXPECTF-- -*** Testing get_object_vars() : error conditions *** - --- Testing get_object_vars() function with Zero arguments -- - -Warning: get_object_vars() expects exactly 1 parameter, 0 given in %s on line 12 -NULL - --- Testing get_object_vars() function with more than expected no. of arguments -- - -Warning: get_object_vars() expects exactly 1 parameter, 2 given in %s on line 18 -NULL -Done diff --git a/ext/standard/tests/class_object/get_parent_class_error_001.phpt b/ext/standard/tests/class_object/get_parent_class_error_001.phpt deleted file mode 100644 index c38275fe4c..0000000000 --- a/ext/standard/tests/class_object/get_parent_class_error_001.phpt +++ /dev/null @@ -1,29 +0,0 @@ ---TEST-- -Test get_parent_class() function : error conditions - wrong number of args. ---FILE-- -<?php -/* Prototype : proto string get_parent_class([mixed object]) - * Description: Retrieves the parent class name for object or class or current scope. - * Source code: Zend/zend_builtin_functions.c - * Alias to functions: - */ - -echo "*** Testing get_parent_class() : error conditions ***\n"; - - -//Test get_parent_class with one more than the expected number of arguments -echo "\n-- Testing get_parent_class() function with more than expected no. of arguments --\n"; -$object = 1; -$extra_arg = 10; -var_dump( get_parent_class($object, $extra_arg) ); - -echo "Done"; -?> ---EXPECTF-- -*** Testing get_parent_class() : error conditions *** - --- Testing get_parent_class() function with more than expected no. of arguments -- - -Warning: get_parent_class() expects at most 1 parameter, 2 given in %s on line 15 -NULL -Done diff --git a/ext/standard/tests/class_object/interface_exists_error.phpt b/ext/standard/tests/class_object/interface_exists_error.phpt deleted file mode 100644 index 1499e42d23..0000000000 --- a/ext/standard/tests/class_object/interface_exists_error.phpt +++ /dev/null @@ -1,38 +0,0 @@ ---TEST-- -Test interface_exists() function : error conditions ---FILE-- -<?php -/* Prototype : bool interface_exists(string classname [, bool autoload]) - * Description: Checks if the class exists - * Source code: Zend/zend_builtin_functions.c - * Alias to functions: - */ - -echo "*** Testing interface_exists() : error conditions ***\n"; - -// Zero arguments -echo "\n-- Testing interface_exists() function with Zero arguments --\n"; -var_dump( interface_exists() ); - -//Test interface_exists with one more than the expected number of arguments -echo "\n-- Testing interface_exists() function with more than expected no. of arguments --\n"; -$classname = 'string_val'; -$autoload = true; -$extra_arg = 10; -var_dump( interface_exists($classname, $autoload, $extra_arg) ); - -?> -===DONE=== ---EXPECTF-- -*** Testing interface_exists() : error conditions *** - --- Testing interface_exists() function with Zero arguments -- - -Warning: interface_exists() expects at least 1 parameter, 0 given in %sinterface_exists_error.php on line %d -NULL - --- Testing interface_exists() function with more than expected no. of arguments -- - -Warning: interface_exists() expects at most 2 parameters, 3 given in %sinterface_exists_error.php on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/class_object/is_a_error_001.phpt b/ext/standard/tests/class_object/is_a_error_001.phpt deleted file mode 100644 index fd8f785bee..0000000000 --- a/ext/standard/tests/class_object/is_a_error_001.phpt +++ /dev/null @@ -1,51 +0,0 @@ ---TEST-- -Test is_a() function : error conditions - wrong number of args ---FILE-- -<?php -/* Prototype : proto bool is_a(object object, string class_name, bool allow_string) - * Description: Returns true if the object is of this class or has this class as one of its parents - * Source code: Zend/zend_builtin_functions.c - * Alias to functions: - */ - -echo "*** Testing is_a() : error conditions ***\n"; - -//Test is_a with one more than the expected number of arguments -echo "\n-- Testing is_a() function with more than expected no. of arguments --\n"; -$object = new stdclass(); -$class_name = 'string_val'; -$allow_string = false; -$extra_arg = 10; - -var_dump( is_a($object, $class_name, $allow_string, $object) ); - -//Test is_a with one more than the expected number of arguments -echo "\n-- Testing is_a() function with non-boolean in last position --\n"; -var_dump( is_a($object, $class_name, $object) ); - - -// Testing is_a with one less than the expected number of arguments -echo "\n-- Testing is_a() function with less than expected no. of arguments --\n"; -$object = new stdclass(); -var_dump( is_a($object) ); - -echo "Done"; -?> ---EXPECTF-- -*** Testing is_a() : error conditions *** - --- Testing is_a() function with more than expected no. of arguments -- - -Warning: is_a() expects at most 3 parameters, 4 given in %s on line 17 -NULL - --- Testing is_a() function with non-boolean in last position -- - -Warning: is_a() expects parameter 3 to be bool, object given in %s on line 21 -NULL - --- Testing is_a() function with less than expected no. of arguments -- - -Warning: is_a() expects at least 2 parameters, 1 given in %s on line 27 -NULL -Done diff --git a/ext/standard/tests/class_object/is_subclass_of_error_001.phpt b/ext/standard/tests/class_object/is_subclass_of_error_001.phpt deleted file mode 100644 index cd5b3b44a6..0000000000 --- a/ext/standard/tests/class_object/is_subclass_of_error_001.phpt +++ /dev/null @@ -1,58 +0,0 @@ ---TEST-- -Test is_subclass_of() function : wrong number of args ---FILE-- -<?php -/* Prototype : proto bool is_subclass_of(object object, string class_name) - * Description: Returns true if the object has this class as one of its parents - * Source code: Zend/zend_builtin_functions.c - * Alias to functions: - */ - -echo "*** Testing is_subclass_of() : error conditions ***\n"; - - -//Test is_subclass_of with one more than the expected number of arguments -echo "\n-- Testing is_subclass_of() function with more than expected no. of arguments --\n"; -$object = new stdclass(); -$class_name = 'string_val'; -$allow_string = false; -$extra_arg = 10; -var_dump( is_subclass_of($object, $class_name, $allow_string, $extra_arg) ); - -//Test is_subclass_of with invalid last argument -echo "\n-- Testing is_subclass_of() function with more than typo style invalid 3rd argument --\n"; -var_dump( is_subclass_of($object, $class_name, $class_name) ); - - -//Test is_subclass_of with invalid last argument -echo "\n-- Testing is_subclass_of() function with more than invalid 3rd argument --\n"; -var_dump( is_subclass_of($object, $class_name, $object) ); - -// Testing is_subclass_of with one less than the expected number of arguments -echo "\n-- Testing is_subclass_of() function with less than expected no. of arguments --\n"; -$object = new stdclass(); -var_dump( is_subclass_of($object) ); - -echo "Done"; -?> ---EXPECTF-- -*** Testing is_subclass_of() : error conditions *** - --- Testing is_subclass_of() function with more than expected no. of arguments -- - -Warning: is_subclass_of() expects at most 3 parameters, 4 given in %s on line 17 -NULL - --- Testing is_subclass_of() function with more than typo style invalid 3rd argument -- -bool(false) - --- Testing is_subclass_of() function with more than invalid 3rd argument -- - -Warning: is_subclass_of() expects parameter 3 to be bool, object given in %s on line 26 -NULL - --- Testing is_subclass_of() function with less than expected no. of arguments -- - -Warning: is_subclass_of() expects at least 2 parameters, 1 given in %s on line 31 -NULL -Done diff --git a/ext/standard/tests/class_object/method_exists_error_001.phpt b/ext/standard/tests/class_object/method_exists_error_001.phpt deleted file mode 100644 index de1edfe04a..0000000000 --- a/ext/standard/tests/class_object/method_exists_error_001.phpt +++ /dev/null @@ -1,40 +0,0 @@ ---TEST-- -Test method_exists() function : error conditions - wrong number of args ---FILE-- -<?php -/* Prototype : proto bool method_exists(object object, string method) - * Description: Checks if the class method exists - * Source code: Zend/zend_builtin_functions.c - * Alias to functions: - */ - -echo "*** Testing method_exists() : error conditions ***\n"; - - -//Test method_exists with one more than the expected number of arguments -echo "\n-- Testing method_exists() function with more than expected no. of arguments --\n"; -$object = new stdclass(); -$method = 'string_val'; -$extra_arg = 10; -var_dump( method_exists($object, $method, $extra_arg) ); - -// Testing method_exists with one less than the expected number of arguments -echo "\n-- Testing method_exists() function with less than expected no. of arguments --\n"; -$object = new stdclass(); -var_dump( method_exists($object) ); - -echo "Done"; -?> ---EXPECTF-- -*** Testing method_exists() : error conditions *** - --- Testing method_exists() function with more than expected no. of arguments -- - -Warning: method_exists() expects exactly 2 parameters, 3 given in %s on line 16 -NULL - --- Testing method_exists() function with less than expected no. of arguments -- - -Warning: method_exists() expects exactly 2 parameters, 1 given in %s on line 21 -NULL -Done diff --git a/ext/standard/tests/class_object/trait_exists_error_001.phpt b/ext/standard/tests/class_object/trait_exists_error_001.phpt deleted file mode 100644 index 70d18513db..0000000000 --- a/ext/standard/tests/class_object/trait_exists_error_001.phpt +++ /dev/null @@ -1,42 +0,0 @@ ---TEST-- -Test trait_exists() function : error conditions (wrong number of arguments) ---FILE-- -<?php -/* Prototype : proto bool trait_exists(string traitname [, bool autoload]) - * Description: Checks if the trait exists - * Source code: Zend/zend_builtin_functions.c - * Alias to functions: - */ - -/** - * Test wrong number of arguments - */ - -echo "*** Testing trait_exists() : error conditions ***\n"; - -// Zero arguments -echo "\n-- Testing trait_exists() function with Zero arguments --\n"; -var_dump( trait_exists() ); - -//Test trait_exists with one more than the expected number of arguments -echo "\n-- Testing trait_exists() function with more than expected no. of arguments --\n"; -$traitname = 'string_val'; -$autoload = true; -$extra_arg = 10; -var_dump( trait_exists($traitname, $autoload, $extra_arg) ); - -echo "Done"; -?> ---EXPECTF-- -*** Testing trait_exists() : error conditions *** - --- Testing trait_exists() function with Zero arguments -- - -Warning: trait_exists() expects at least 1 parameter, 0 given in %s on line 16 -NULL - --- Testing trait_exists() function with more than expected no. of arguments -- - -Warning: trait_exists() expects at most 2 parameters, 3 given in %s on line 23 -NULL -Done diff --git a/ext/standard/tests/general_functions/debug_zval_dump_e.phpt b/ext/standard/tests/general_functions/debug_zval_dump_e.phpt deleted file mode 100644 index 8d1947e194..0000000000 --- a/ext/standard/tests/general_functions/debug_zval_dump_e.phpt +++ /dev/null @@ -1,22 +0,0 @@ ---TEST-- -Test debug_zval_dump() function : error conditions ---FILE-- -<?php -/* Prototype: void debug_zval_dump ( mixed $variable ); - Description: Dumps a string representation of an internal zend value - to output. -*/ - -echo "*** Testing error conditions ***\n"; - -/* passing zero argument */ -debug_zval_dump(); - -echo "Done\n"; - -?> ---EXPECTF-- -*** Testing error conditions *** - -Warning: debug_zval_dump() expects at least %d parameter, %d given in %s on line %d -Done diff --git a/ext/standard/tests/general_functions/escapeshellarg_error.phpt b/ext/standard/tests/general_functions/escapeshellarg_error.phpt deleted file mode 100644 index 8746b5884a..0000000000 --- a/ext/standard/tests/general_functions/escapeshellarg_error.phpt +++ /dev/null @@ -1,73 +0,0 @@ ---TEST-- -Test escapeshellarg() function : error conditions - wrong numbers of parameters ---FILE-- -<?php - -/* Prototype : string escapeshellarg ( string $arg ) - * Description: Escape a string to be used as a shell argument. - * Source code: ext/standard/exec.c - */ - -/* - * Pass an incorrect number of arguments to escapeshellarg() to test behaviour - */ - -echo "*** Testing escapeshellarg() : error conditions ***\n"; - - -echo "\n-- Testing escapeshellarg() function with no arguments --\n"; -var_dump( escapeshellarg() ); - -echo "\n-- Testing escapeshellarg() function with more than expected no. of arguments --\n"; -$arg = "Mr O'Neil"; -$extra_arg = 10; -var_dump( escapeshellarg($arg, $extra_arg) ); - -echo "\n-- Testing escapeshellarg() function with a object supplied for argument --\n"; - -class classA -{ -} - -$arg = new classA(); -var_dump( escapeshellarg($arg)); - -echo "\n-- Testing escapeshellarg() function with a resource supplied for argument --\n"; -$fp = fopen(__FILE__, "r"); -var_dump( escapeshellarg($fp)); -fclose($fp); - -echo "\n-- Testing escapeshellarg() function with a array supplied for argument --\n"; -$arg = array(1,2,3); -var_dump( escapeshellarg($arg)); - -?> -===Done=== ---EXPECTF-- -*** Testing escapeshellarg() : error conditions *** - --- Testing escapeshellarg() function with no arguments -- - -Warning: escapeshellarg() expects exactly 1 parameter, 0 given in %s on line %d -NULL - --- Testing escapeshellarg() function with more than expected no. of arguments -- - -Warning: escapeshellarg() expects exactly 1 parameter, 2 given in %s on line %d -NULL - --- Testing escapeshellarg() function with a object supplied for argument -- - -Warning: escapeshellarg() expects parameter 1 to be string, object given in %s on line %d -NULL - --- Testing escapeshellarg() function with a resource supplied for argument -- - -Warning: escapeshellarg() expects parameter 1 to be string, resource given in %s on line %d -NULL - --- Testing escapeshellarg() function with a array supplied for argument -- - -Warning: escapeshellarg() expects parameter 1 to be string, array given in %s on line %d -NULL -===Done=== diff --git a/ext/standard/tests/general_functions/floatval_error.phpt b/ext/standard/tests/general_functions/floatval_error.phpt deleted file mode 100644 index 3f6fca4076..0000000000 --- a/ext/standard/tests/general_functions/floatval_error.phpt +++ /dev/null @@ -1,40 +0,0 @@ ---TEST-- -Testing floatval() and its alias doubleval() : error conditions - wrong numbers of parametersns ---FILE-- -<?php -/* Prototype: float floatval( mixed $var ); - * Description: Returns the float value of var. - */ - -echo "*** Testing floatval() and doubleval() : error conditions ***\n"; - - -echo "\n-- Testing floatval() and doubleval() function with no arguments --\n"; -var_dump( floatval() ); -var_dump( doubleval() ); - -echo "\n-- Testing floatval() and doubleval() function with more than expected no. of arguments --\n"; -var_dump( floatval(10.5, FALSE) ); -var_dump( doubleval(10.5, FALSE) ); - -?> -===DONE=== ---EXPECTF-- -*** Testing floatval() and doubleval() : error conditions *** - --- Testing floatval() and doubleval() function with no arguments -- - -Warning: floatval() expects exactly 1 parameter, 0 given in %s on line %d -NULL - -Warning: doubleval() expects exactly 1 parameter, 0 given in %s on line %d -NULL - --- Testing floatval() and doubleval() function with more than expected no. of arguments -- - -Warning: floatval() expects exactly 1 parameter, 2 given in %s on line %d -NULL - -Warning: doubleval() expects exactly 1 parameter, 2 given in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/general_functions/get_cfg_var_error.phpt b/ext/standard/tests/general_functions/get_cfg_var_error.phpt deleted file mode 100644 index 1c319bf790..0000000000 --- a/ext/standard/tests/general_functions/get_cfg_var_error.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -Test function get_cfg_var() by calling it more than or less than its expected arguments ---CREDITS-- -Francesco Fullone ff@ideato.it -#PHPTestFest Cesena Italia on 2009-06-20 ---INI-- -session.use_cookies=0 -session.serialize_handler=php -session.save_handler=files ---FILE-- -<?php - -echo "*** Test by calling method or function with incorrect numbers of arguments ***\n"; - -var_dump(get_cfg_var( 'session.use_cookies', 'session.serialize_handler' ) ); -var_dump(get_cfg_var( ) ); - - -?> ---EXPECTF-- -*** Test by calling method or function with incorrect numbers of arguments *** - -Warning: get_cfg_var() expects exactly 1 parameter, 2 given in %s on line %d -NULL - -Warning: get_cfg_var() expects exactly 1 parameter, 0 given in %s on line %d -NULL diff --git a/ext/standard/tests/general_functions/get_cfg_var_variation1.phpt b/ext/standard/tests/general_functions/get_cfg_var_variation1.phpt deleted file mode 100644 index 4e59f288ee..0000000000 --- a/ext/standard/tests/general_functions/get_cfg_var_variation1.phpt +++ /dev/null @@ -1,46 +0,0 @@ ---TEST-- -Test function get_cfg_var() by substituting argument 1 with array values. ---CREDITS-- -Francesco Fullone ff@ideato.it -#PHPTestFest Cesena Italia on 2009-06-20 ---INI-- -session.use_cookies=0 -session.serialize_handler=php -session.save_handler=files ---FILE-- -<?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(get_cfg_var( $var ) ); -} -?> ---EXPECTF-- -*** Test substituting argument 1 with array values *** - -Warning: get_cfg_var() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: get_cfg_var() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: get_cfg_var() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: get_cfg_var() expects parameter 1 to be string, array given in %s on line %d -NULL diff --git a/ext/standard/tests/general_functions/get_cfg_var_variation6.phpt b/ext/standard/tests/general_functions/get_cfg_var_variation6.phpt deleted file mode 100644 index d142621a13..0000000000 --- a/ext/standard/tests/general_functions/get_cfg_var_variation6.phpt +++ /dev/null @@ -1,44 +0,0 @@ ---TEST-- -Test function get_cfg_var() by substituting argument 1 with object values. ---CREDITS-- -Francesco Fullone ff@ideato.it -#PHPTestFest Cesena Italia on 2009-06-20 ---INI-- -session.use_cookies=0 -session.serialize_handler=php -session.save_handler=files ---FILE-- -<?php - - -echo "*** Test substituting argument 1 with object values ***\n"; - - - -class classWithToString -{ - public function __toString() { - return "session.use_cookies"; - } -} - -class classWithoutToString -{ -} - -$variation_array = array( - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - ); - - -foreach ( $variation_array as $var ) { - var_dump(get_cfg_var( $var ) ); -} -?> ---EXPECTF-- -*** Test substituting argument 1 with object values *** -string(1) "0" - -Warning: get_cfg_var() expects parameter 1 to be string, object given in %s.php on line %d -NULL diff --git a/ext/standard/tests/general_functions/get_defined_constants_error.phpt b/ext/standard/tests/general_functions/get_defined_constants_error.phpt deleted file mode 100644 index c9eb22e256..0000000000 --- a/ext/standard/tests/general_functions/get_defined_constants_error.phpt +++ /dev/null @@ -1,25 +0,0 @@ ---TEST-- -Test get_defined_constants() function : error conditions ---FILE-- -<?php -/* Prototype : array get_defined_constants ([ bool $categorize ] ) - * Description: Returns an associative array with the names of all the constants and their values - * Source code: Zend/zend_builtin_functions.c - */ - -echo "*** Testing get_defined_constants() : error conditions ***\n"; - -echo "\n-- Testing get_defined_constants() function with more than expected no. of arguments --\n"; -$extra_arg = 10; -var_dump( get_defined_constants(true, $extra_arg) ); - -?> -===DONE=== ---EXPECTF-- -*** Testing get_defined_constants() : error conditions *** - --- Testing get_defined_constants() function with more than expected no. of arguments -- - -Warning: get_defined_constants() expects at most 1 parameter, 2 given in %s on line 11 -NULL -===DONE=== diff --git a/ext/standard/tests/general_functions/get_loaded_extensions_error.phpt b/ext/standard/tests/general_functions/get_loaded_extensions_error.phpt deleted file mode 100644 index 8bb782fc79..0000000000 --- a/ext/standard/tests/general_functions/get_loaded_extensions_error.phpt +++ /dev/null @@ -1,26 +0,0 @@ ---TEST-- -Test get_loaded_extensions() function : error conditions ---FILE-- -<?php -/* Prototype : array get_loaded_extensions ([ bool $zend_extensions= false ] ) - * Description: Returns an array with the names of all modules compiled and loaded - * Source code: Zend/zend_builtin_functions.c - */ - -echo "*** Testing get_loaded_extensions() : error conditions ***\n"; - -echo "\n-- Testing get_loaded_extensions() function with more than expected no. of arguments --\n"; -$res = fopen(__FILE__, "r"); -$extra_arg = 10; -var_dump( get_resource_type(true, $extra_arg) ); - -?> -===DONE=== ---EXPECTF-- -*** Testing get_loaded_extensions() : error conditions *** - --- Testing get_loaded_extensions() function with more than expected no. of arguments -- - -Warning: get_resource_type() expects exactly 1 parameter, 2 given in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/general_functions/get_magic_quotes_gpc.phpt b/ext/standard/tests/general_functions/get_magic_quotes_gpc.phpt deleted file mode 100644 index add1ea141c..0000000000 --- a/ext/standard/tests/general_functions/get_magic_quotes_gpc.phpt +++ /dev/null @@ -1,26 +0,0 @@ ---TEST-- -Test get_magic_quotes_gpc() function ---FILE-- -<?php -/* Prototype: int get_magic_quotes_gpc ( void ) - * This function is not supported anymore and will always return false - */ - -echo "Simple testcase for get_magic_quotes_gpc() function\n"; -var_dump(get_magic_quotes_gpc()); - -echo "\n-- Error cases --\n"; -// no checks on number of args -var_dump(get_magic_quotes_gpc(true)); - -?> -===DONE=== ---EXPECTF-- -Simple testcase for get_magic_quotes_gpc() function -bool(false) - --- Error cases -- - -Warning: get_magic_quotes_gpc() expects exactly 0 parameters, 1 given in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/general_functions/get_magic_quotes_runtime.phpt b/ext/standard/tests/general_functions/get_magic_quotes_runtime.phpt deleted file mode 100644 index 620e97cf83..0000000000 --- a/ext/standard/tests/general_functions/get_magic_quotes_runtime.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -Test get_magic_quotes_runtime() function ---FILE-- -<?php -/* Prototype: int get_magic_quotes_runtime ( void ) - * This function is not supported anymore and will always return false - */ - -echo "Simple testcase for get_magic_quotes_runtime() function\n"; - -var_dump(get_magic_quotes_runtime()); - -echo "\n-- Error cases --\n"; -// no checks on number of args -var_dump(get_magic_quotes_runtime(true)); - -?> -===DONE=== ---EXPECTF-- -Simple testcase for get_magic_quotes_runtime() function -bool(false) - --- Error cases -- - -Warning: get_magic_quotes_runtime() expects exactly 0 parameters, 1 given in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/general_functions/get_resource_type_error.phpt b/ext/standard/tests/general_functions/get_resource_type_error.phpt deleted file mode 100644 index fd8fce6e53..0000000000 --- a/ext/standard/tests/general_functions/get_resource_type_error.phpt +++ /dev/null @@ -1,34 +0,0 @@ ---TEST-- -Test get_resource_type() function : error conditions ---FILE-- -<?php -/* Prototype : string get_resource_type ( resource $handle ) - * Description: Returns the resource type - * Source code: Zend/zend_builtin_functions.c - */ - -echo "*** Testing get_resource_type() : error conditions ***\n"; - -echo "\n-- Testing get_resource_type() function with Zero arguments --\n"; -var_dump( get_resource_type() ); - -echo "\n-- Testing get_resource_type() function with more than expected no. of arguments --\n"; -$res = fopen(__FILE__, "r"); -$extra_arg = 10; -var_dump( get_resource_type($res, $extra_arg) ); - -?> -===DONE=== ---EXPECTF-- -*** Testing get_resource_type() : error conditions *** - --- Testing get_resource_type() function with Zero arguments -- - -Warning: get_resource_type() expects exactly 1 parameter, 0 given in %s on line %d -NULL - --- Testing get_resource_type() function with more than expected no. of arguments -- - -Warning: get_resource_type() expects exactly 1 parameter, 2 given in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/general_functions/get_resource_type_variation1.phpt b/ext/standard/tests/general_functions/get_resource_type_variation1.phpt deleted file mode 100644 index b5f33e1830..0000000000 --- a/ext/standard/tests/general_functions/get_resource_type_variation1.phpt +++ /dev/null @@ -1,74 +0,0 @@ ---TEST-- -Test get_resource_type() function : usage variations - different data types as handle arg ---FILE-- -<?php -/* Prototype : string get_resource_type ( resource $handle ) - * Description: Returns the resource type - * Source code: Zend/zend_builtin_functions.c - */ - -echo "*** Testing get_resource_type() : variation test ***\n"; - -class Hello { - public function SayHello($arg) { - echo "Hello\n"; - } -} - -$res = fopen(__FILE__, "r"); - -$vars = array( - "bool"=>true, - "int 10"=>10, - "float 10.5"=>10.5, - "string"=>"Hello World", - "array"=>array(1,2,3,4,5), - "NULL"=>NULL, - "Object"=>new Hello() -); - -foreach($vars as $variation =>$object) { - echo "\n-- $variation --\n"; - var_dump(get_resource_type($object)); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing get_resource_type() : variation test *** - --- bool -- - -Warning: get_resource_type() expects parameter 1 to be resource, bool given in %s on line %d -NULL - --- int 10 -- - -Warning: get_resource_type() expects parameter 1 to be resource, int given in %s on line %d -NULL - --- float 10.5 -- - -Warning: get_resource_type() expects parameter 1 to be resource, float given in %s on line %d -NULL - --- string -- - -Warning: get_resource_type() expects parameter 1 to be resource, string given in %s on line %d -NULL - --- array -- - -Warning: get_resource_type() expects parameter 1 to be resource, array given in %s on line %d -NULL - --- NULL -- - -Warning: get_resource_type() expects parameter 1 to be resource, null given in %s on line %d -NULL - --- Object -- - -Warning: get_resource_type() expects parameter 1 to be resource, object given in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/general_functions/getrusage_error.phpt b/ext/standard/tests/general_functions/getrusage_error.phpt deleted file mode 100644 index 66deb91a31..0000000000 --- a/ext/standard/tests/general_functions/getrusage_error.phpt +++ /dev/null @@ -1,70 +0,0 @@ ---TEST-- -Test getrusage() function : error conditions - incorrect number of args ---SKIPIF-- -<?php if (!function_exists("getrusage")) print "skip"; ?> ---FILE-- -<?php -/* Prototype : array getrusage ([ int $who ] ) - * Description: Gets the current resource usages - * Source code: ext/standard/microtime.c - * Alias to functions: - */ - -/* - * Pass an incorrect number of arguments to getrusage() to test behaviour - */ - -echo "*** Testing getrusage() : error conditions ***\n"; - -echo "\n-- Testing getrusage() function with more than expected no. of arguments --\n"; -$extra_arg = 10; -$dat = getrusage(1, $extra_arg); - -echo "\n-- Testing getrusage() function with invalid argument - non-numeric STRING--\n"; -$string_arg = "foo"; -$dat = getrusage($string_arg); - -echo "\n-- Testing getrusage() function with invalid argument - ARRAY--\n"; -$array_arg = array(1,2,3); -$dat = getrusage($array_arg); - -echo "\n-- Testing getrusage() function with invalid argument - OBJECT --\n"; -class classA -{ - function __toString() { - return "ClassAObject"; - } -} -$obj_arg = new classA(); -$dat = getrusage($obj_arg); - -echo "\n-- Testing getrusage() function with invalid argument - RESOURCE --\n"; -$file_handle=fopen(__FILE__, "r"); -$dat = getrusage($file_handle); -fclose($file_handle); - -?> -===DONE=== ---EXPECTF-- -*** Testing getrusage() : error conditions *** - --- Testing getrusage() function with more than expected no. of arguments -- - -Warning: getrusage() expects at most 1 parameter, 2 given in %s on line %d - --- Testing getrusage() function with invalid argument - non-numeric STRING-- - -Warning: getrusage() expects parameter 1 to be int, string given in %s on line %d - --- Testing getrusage() function with invalid argument - ARRAY-- - -Warning: getrusage() expects parameter 1 to be int, array given in %s on line %d - --- Testing getrusage() function with invalid argument - OBJECT -- - -Warning: getrusage() expects parameter 1 to be int, object given in %s on line %d - --- Testing getrusage() function with invalid argument - RESOURCE -- - -Warning: getrusage() expects parameter 1 to be int, resource given in %s on line %d -===DONE=== diff --git a/ext/standard/tests/general_functions/getservbyname_error.phpt b/ext/standard/tests/general_functions/getservbyname_error.phpt deleted file mode 100644 index ec9b7795a5..0000000000 --- a/ext/standard/tests/general_functions/getservbyname_error.phpt +++ /dev/null @@ -1,21 +0,0 @@ ---TEST-- -Test function getservbyname() by calling it more than or less than its expected arguments ---CREDITS-- -Italian PHP TestFest 2009 Cesena 19-20-21 june -Fabio Fabbrucci (fabbrucci@grupporetina.com) -Michele Orselli (mo@ideato.it) -Danilo Sanchi (sanchi@grupporetina.com) ---FILE-- -<?php -$service = "www"; -$protocol = "tcp"; -$extra_arg = 12; -var_dump(getservbyname($service, $protocol, $extra_arg ) ); -var_dump(getservbyname($service)); -?> ---EXPECTF-- -Warning: getservbyname() expects exactly 2 parameters, %d given in %s on line %d -NULL - -Warning: getservbyname() expects exactly 2 parameters, %d given in %s on line %d -NULL diff --git a/ext/standard/tests/general_functions/getservbyname_variation1.phpt b/ext/standard/tests/general_functions/getservbyname_variation1.phpt deleted file mode 100644 index 7dd01aab36..0000000000 --- a/ext/standard/tests/general_functions/getservbyname_variation1.phpt +++ /dev/null @@ -1,40 +0,0 @@ ---TEST-- -Test function getservbyname() by substituting argument 1 with array values. ---FILE-- -<?php - - -echo "*** Test substituting argument 1 with array values ***\n"; - -$protocol = "tcp"; - - -$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(getservbyname( $var , $protocol ) ); -} -?> ---EXPECTF-- -*** Test substituting argument 1 with array values *** - -Warning: getservbyname() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: getservbyname() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: getservbyname() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: getservbyname() expects parameter 1 to be string, array given in %s on line %d -NULL diff --git a/ext/standard/tests/general_functions/getservbyname_variation13.phpt b/ext/standard/tests/general_functions/getservbyname_variation13.phpt deleted file mode 100644 index 8dad8cda55..0000000000 --- a/ext/standard/tests/general_functions/getservbyname_variation13.phpt +++ /dev/null @@ -1,38 +0,0 @@ ---TEST-- -Test function getservbyname() by substituting argument 2 with object values. ---FILE-- -<?php - - -echo "*** Test substituting argument 2 with object values ***\n"; - -$service = "www"; - - -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(getservbyname( $service, $var ) ); -} -?> ---EXPECTF-- -*** Test substituting argument 2 with object values *** -bool(false) - -Warning: getservbyname() expects parameter 2 to be string, object given in %s.php on line %d -NULL diff --git a/ext/standard/tests/general_functions/getservbyname_variation6.phpt b/ext/standard/tests/general_functions/getservbyname_variation6.phpt deleted file mode 100644 index 0dfafa6229..0000000000 --- a/ext/standard/tests/general_functions/getservbyname_variation6.phpt +++ /dev/null @@ -1,38 +0,0 @@ ---TEST-- -Test function getservbyname() by substituting argument 1 with object values. ---FILE-- -<?php - - -echo "*** Test substituting argument 1 with object values ***\n"; - -$protocol = "tcp"; - - -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(getservbyname( $var , $protocol ) ); -} -?> ---EXPECTF-- -*** Test substituting argument 1 with object values *** -bool(false) - -Warning: getservbyname() expects parameter 1 to be string, object given in %s.php on line %d -NULL diff --git a/ext/standard/tests/general_functions/getservbyname_variation8.phpt b/ext/standard/tests/general_functions/getservbyname_variation8.phpt deleted file mode 100644 index 69d1d77b6a..0000000000 --- a/ext/standard/tests/general_functions/getservbyname_variation8.phpt +++ /dev/null @@ -1,40 +0,0 @@ ---TEST-- -Test function getservbyname() by substituting argument 2 with array values. ---FILE-- -<?php - - -echo "*** Test substituting argument 2 with array values ***\n"; - -$service = "www"; - - -$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(getservbyname( $service, $var ) ); -} -?> ---EXPECTF-- -*** Test substituting argument 2 with array values *** - -Warning: getservbyname() expects parameter 2 to be string, array given in %s on line %d -NULL - -Warning: getservbyname() expects parameter 2 to be string, array given in %s on line %d -NULL - -Warning: getservbyname() expects parameter 2 to be string, array given in %s on line %d -NULL - -Warning: getservbyname() expects parameter 2 to be string, array given in %s on line %d -NULL diff --git a/ext/standard/tests/general_functions/getservbyport_error.phpt b/ext/standard/tests/general_functions/getservbyport_error.phpt deleted file mode 100644 index 7d4107cedf..0000000000 --- a/ext/standard/tests/general_functions/getservbyport_error.phpt +++ /dev/null @@ -1,21 +0,0 @@ ---TEST-- -Test function getservbyport() by calling it more than or less than its expected arguments ---CREDITS-- -Italian PHP TestFest 2009 Cesena 19-20-21 june -Fabio Fabbrucci (fabbrucci@grupporetina.com) -Michele Orselli (mo@ideato.it) -Simone Gentili (sensorario@gmail.com) ---FILE-- -<?php -$port = 80; -$protocol = "tcp"; -$extra_arg = 12; -var_dump(getservbyport( $port, $protocol, $extra_arg ) ); -var_dump(getservbyport($port)); -?> ---EXPECTF-- -Warning: getservbyport() expects exactly 2 parameters, %d given in %s on line %d -NULL - -Warning: getservbyport() expects exactly 2 parameters, %d given in %s on line %d -NULL diff --git a/ext/standard/tests/general_functions/is_callable_error.phpt b/ext/standard/tests/general_functions/is_callable_error.phpt deleted file mode 100644 index 1e9e3b7fde..0000000000 --- a/ext/standard/tests/general_functions/is_callable_error.phpt +++ /dev/null @@ -1,32 +0,0 @@ ---TEST-- -Test is_callable() function ---FILE-- -<?php -/* Prototype: bool is_callable ( mixed $var [, bool $syntax_only [, string &$callable_name]] ); - Description: Verify that the contents of a variable can be called as a function - In case of objects, $var = array($SomeObject, 'MethodName') -*/ - -echo "\n*** Testing error conditions ***\n"; - -echo "\n-- Testing is_callable() function with less than expected no. of arguments --\n"; -var_dump( is_callable() ); - -echo "\n-- Testing is_callable() function with more than expected no. of arguments --\n"; -var_dump( is_callable("string", TRUE, $callable_name, "EXTRA") ); - -?> -===DONE=== ---EXPECTF-- -*** Testing error conditions *** - --- Testing is_callable() function with less than expected no. of arguments -- - -Warning: is_callable() expects at least 1 parameter, 0 given in %s on line %d -NULL - --- Testing is_callable() function with more than expected no. of arguments -- - -Warning: is_callable() expects at most 3 parameters, 4 given in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/general_functions/is_resource_error.phpt b/ext/standard/tests/general_functions/is_resource_error.phpt deleted file mode 100644 index b90f8a26e1..0000000000 --- a/ext/standard/tests/general_functions/is_resource_error.phpt +++ /dev/null @@ -1,34 +0,0 @@ ---TEST-- -Test is_resource() function : error conditions ---FILE-- -<?php -/* Prototype : bool is_resource ( mixed $var ) - * Description: Finds whether a variable is a resource - * Source code: ext/standard/type.c - */ - -echo "*** Testing is_resource() : error conditions ***\n"; - -echo "\n-- Testing is_resource() function with Zero arguments --\n"; -var_dump( is_resource() ); - -echo "\n-- Testing is_resource() function with more than expected no. of arguments --\n"; -$res = fopen(__FILE__, "r"); -$extra_arg = 10; -var_dump( is_resource($res, $extra_arg) ); - -?> -===DONE=== ---EXPECTF-- -*** Testing is_resource() : error conditions *** - --- Testing is_resource() function with Zero arguments -- - -Warning: is_resource() expects exactly 1 parameter, 0 given in %s on line %d -bool(false) - --- Testing is_resource() function with more than expected no. of arguments -- - -Warning: is_resource() expects exactly 1 parameter, 2 given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/standard/tests/general_functions/proc_nice_error.phpt b/ext/standard/tests/general_functions/proc_nice_error.phpt deleted file mode 100644 index a05a18263e..0000000000 --- a/ext/standard/tests/general_functions/proc_nice_error.phpt +++ /dev/null @@ -1,28 +0,0 @@ ---TEST-- -Test function proc_nice() by calling it more than or less than its expected arguments ---SKIPIF-- -<?php -if(!function_exists('proc_nice')) die("skip. proc_nice not available "); -?> ---FILE-- -<?php -echo "*** Test by calling method or function with incorrect numbers of arguments ***\n"; - -$priority = 1; - -$extra_arg = 1; - -var_dump(proc_nice( $priority, $extra_arg) ); - -var_dump(proc_nice( ) ); - - -?> ---EXPECTF-- -*** Test by calling method or function with incorrect numbers of arguments *** - -Warning: proc_nice() expects exactly 1 parameter, 2 given in %s line %d -bool(false) - -Warning: proc_nice() expects exactly 1 parameter, 0 given in %s line %d -bool(false) diff --git a/ext/standard/tests/general_functions/proc_nice_variation1.phpt b/ext/standard/tests/general_functions/proc_nice_variation1.phpt deleted file mode 100644 index 4aa4b47801..0000000000 --- a/ext/standard/tests/general_functions/proc_nice_variation1.phpt +++ /dev/null @@ -1,48 +0,0 @@ ---TEST-- -Test function proc_nice() by substituting argument 1 with array 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 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(proc_nice( $var ) ); -} -?> ---EXPECTF-- -*** Test substituting argument 1 with array values *** - -Warning: proc_nice() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Warning: proc_nice() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Warning: proc_nice() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Warning: proc_nice() expects parameter 1 to be int, array given in %s on line %d -bool(false) diff --git a/ext/standard/tests/general_functions/proc_nice_variation7.phpt b/ext/standard/tests/general_functions/proc_nice_variation7.phpt deleted file mode 100644 index 368d2b1079..0000000000 --- a/ext/standard/tests/general_functions/proc_nice_variation7.phpt +++ /dev/null @@ -1,49 +0,0 @@ ---TEST-- -Test function proc_nice() by substituting argument 1 with string 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 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(proc_nice( $var ) ); -} -?> ---EXPECTF-- -*** Test substituting argument 1 with string values *** - -Warning: proc_nice() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: proc_nice() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: proc_nice() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: proc_nice() expects parameter 1 to be int, string given in %s on line %d -bool(false) diff --git a/ext/standard/tests/general_functions/uniqid_error.phpt b/ext/standard/tests/general_functions/uniqid_error.phpt deleted file mode 100644 index 4a56234bec..0000000000 --- a/ext/standard/tests/general_functions/uniqid_error.phpt +++ /dev/null @@ -1,46 +0,0 @@ ---TEST-- -Test uniqid() function : error conditions ---FILE-- -<?php -/* Prototype : string uniqid ([ string $prefix= "" [, bool $more_entropy= false ]] ) - * Description: Gets a prefixed unique identifier based on the current time in microseconds. - * Source code: ext/standard/uniqid.c -*/ -echo "*** Testing uniqid() : error conditions ***\n"; - -echo "\n-- Testing uniqid() function with more than expected no. of arguments --\n"; -$prefix = null; -$more_entropy = false; -$extra_arg = false; -var_dump(uniqid($prefix, $more_entropy, $extra_arg)); - -echo "\n-- Testing uniqid() function with invalid values for \$prefix --\n"; -class class1{} -$obj = new class1(); -$res = fopen(__FILE__, "r"); -$array = array(1,2,3); - -uniqid($array, false); -uniqid($res, false); -uniqid($obj, false); - -fclose($res); - -?> -===DONE=== ---EXPECTF-- -*** Testing uniqid() : error conditions *** - --- Testing uniqid() function with more than expected no. of arguments -- - -Warning: uniqid() expects at most 2 parameters, 3 given in %s on line %d -NULL - --- Testing uniqid() function with invalid values for $prefix -- - -Warning: uniqid() expects parameter 1 to be string, array given in %s on line %d - -Warning: uniqid() expects parameter 1 to be string, resource given in %s on line %d - -Warning: uniqid() expects parameter 1 to be string, object given in %s on line %d -===DONE=== diff --git a/ext/standard/tests/general_functions/var_export_error1.phpt b/ext/standard/tests/general_functions/var_export_error1.phpt deleted file mode 100644 index ffa542c053..0000000000 --- a/ext/standard/tests/general_functions/var_export_error1.phpt +++ /dev/null @@ -1,38 +0,0 @@ ---TEST-- -Test var_export() function : error conditions ---FILE-- -<?php -/* Prototype : mixed var_export(mixed var [, bool return]) - * Description: Outputs or returns a string representation of a variable - * Source code: ext/standard/var.c - * Alias to functions: - */ - -echo "*** Testing var_export() : error conditions ***\n"; - -// Zero arguments -echo "\n-- Testing var_export() function with Zero arguments --\n"; -var_dump( var_export() ); - -//Test var_export with one more than the expected number of arguments -echo "\n-- Testing var_export() function with more than expected no. of arguments --\n"; -$var = 1; -$return = true; -$extra_arg = 10; -var_dump( var_export($var, $return, $extra_arg) ); - -?> -===DONE=== ---EXPECTF-- -*** Testing var_export() : error conditions *** - --- Testing var_export() function with Zero arguments -- - -Warning: var_export() expects at least 1 parameter, 0 given in %s on line 12 -NULL - --- Testing var_export() function with more than expected no. of arguments -- - -Warning: var_export() expects at most 2 parameters, 3 given in %s on line 19 -NULL -===DONE=== diff --git a/ext/standard/tests/strings/addcslashes_004.phpt b/ext/standard/tests/strings/addcslashes_004.phpt deleted file mode 100644 index a787845506..0000000000 --- a/ext/standard/tests/strings/addcslashes_004.phpt +++ /dev/null @@ -1,30 +0,0 @@ ---TEST-- -Test addcslashes() function (errors) ---INI-- -precision=14 ---FILE-- -<?php - -echo "\n*** Testing error conditions ***\n"; -/* zero argument */ -var_dump( addcslashes() ); - -/* unexpected arguments */ -var_dump( addcslashes("foo[]") ); -var_dump( addcslashes('foo[]', "o", "foo") ); - -echo "Done\n"; - -?> ---EXPECTF-- -*** Testing error conditions *** - -Warning: addcslashes() expects exactly 2 parameters, 0 given in %s on line %d -NULL - -Warning: addcslashes() expects exactly 2 parameters, 1 given in %s on line %d -NULL - -Warning: addcslashes() expects exactly 2 parameters, 3 given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/strings/addslashes_error.phpt b/ext/standard/tests/strings/addslashes_error.phpt deleted file mode 100644 index c5d67c09ae..0000000000 --- a/ext/standard/tests/strings/addslashes_error.phpt +++ /dev/null @@ -1,43 +0,0 @@ ---TEST-- -Test addslashes() function : error conditions ---FILE-- -<?php -/* Prototype : string addslashes ( string $str ) - * Description: Returns a string with backslashes before characters that need to be quoted in database queries etc. - * Source code: ext/standard/string.c -*/ - -/* - * Testing addslashes() for error conditions -*/ - -echo "*** Testing addslashes() : error conditions ***\n"; - -// Zero argument -echo "\n-- Testing addslashes() function with Zero arguments --\n"; -var_dump( addslashes() ); - -// More than expected number of arguments -echo "\n-- Testing addslashes() function with more than expected no. of arguments --\n"; -$str = '"hello"\"world"'; -$extra_arg = 10; - -var_dump( addslashes($str, $extra_arg) ); -var_dump( $str ); - -echo "Done\n"; -?> ---EXPECTF-- -*** Testing addslashes() : error conditions *** - --- Testing addslashes() function with Zero arguments -- - -Warning: addslashes() expects exactly 1 parameter, 0 given in %s on line %d -NULL - --- Testing addslashes() function with more than expected no. of arguments -- - -Warning: addslashes() expects exactly 1 parameter, 2 given in %s on line %d -NULL -string(15) ""hello"\"world"" -Done diff --git a/ext/standard/tests/strings/basename_error.phpt b/ext/standard/tests/strings/basename_error.phpt deleted file mode 100644 index 8309c3578b..0000000000 --- a/ext/standard/tests/strings/basename_error.phpt +++ /dev/null @@ -1,58 +0,0 @@ ---TEST-- -Test basename() function : error conditions ---FILE-- -<?php -/* Prototype: string basename ( string $path [, string $suffix] ); - Description: Given a string containing a path to a file, - this function will return the base name of the file. - If the filename ends in suffix this will also be cut off. -*/ -echo "*** Testing error conditions ***\n"; -// zero arguments -var_dump( basename() ); - -// more than expected no. of arguments -var_dump( basename("/var/tmp/bar.gz", ".gz", ".gz") ); - -// passing invalid type arguments -$object = new stdclass; -var_dump( basename( array("string/bar") ) ); -var_dump( basename( array("string/bar"), "bar" ) ); -var_dump( basename( "bar", array("string/bar") ) ); -var_dump( basename( $object, "bar" ) ); -var_dump( basename( $object ) ); -var_dump( basename( $object, $object ) ); -var_dump( basename( "bar", $object ) ); - -echo "Done\n"; -?> ---EXPECTF-- -*** Testing error conditions *** - -Warning: basename() expects at least 1 parameter, 0 given in %s on line %d -NULL - -Warning: basename() expects at most 2 parameters, 3 given in %s on line %d -NULL - -Warning: basename() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: basename() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: basename() expects parameter 2 to be string, array given in %s on line %d -NULL - -Warning: basename() expects parameter 1 to be string, object given in %s on line %d -NULL - -Warning: basename() expects parameter 1 to be string, object given in %s on line %d -NULL - -Warning: basename() expects parameter 1 to be string, object given in %s on line %d -NULL - -Warning: basename() expects parameter 2 to be string, object given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/strings/bin2hex_error.phpt b/ext/standard/tests/strings/bin2hex_error.phpt deleted file mode 100644 index efee90bdee..0000000000 --- a/ext/standard/tests/strings/bin2hex_error.phpt +++ /dev/null @@ -1,34 +0,0 @@ ---TEST-- -Test bin2hex() function : error conditions ---FILE-- -<?php - -/* Prototype : string bin2hex ( string $str ) - * Description: Convert binary data into hexadecimal representation - * Source code: ext/standard/string.c -*/ - -echo "*** Testing bin2hex() : error conditions ***\n"; - -echo "\n-- Testing bin2hex() function with no arguments --\n"; -var_dump( bin2hex() ); - -echo "\n-- Testing bin2hex() function with more than expected no. of arguments --\n"; -$extra_arg = 10; -var_dump( bin2hex("Hello World", $extra_arg) ); - -?> -===DONE=== ---EXPECTF-- -*** Testing bin2hex() : error conditions *** - --- Testing bin2hex() function with no arguments -- - -Warning: bin2hex() expects exactly 1 parameter, 0 given in %s on line %d -NULL - --- Testing bin2hex() function with more than expected no. of arguments -- - -Warning: bin2hex() expects exactly 1 parameter, 2 given in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/strings/chop_error.phpt b/ext/standard/tests/strings/chop_error.phpt deleted file mode 100644 index 2f2656f3aa..0000000000 --- a/ext/standard/tests/strings/chop_error.phpt +++ /dev/null @@ -1,44 +0,0 @@ ---TEST-- -Test chop() function : error conditions ---FILE-- -<?php -/* Prototype : string chop ( string $str [, string $charlist] ) - * Description: Strip whitespace (or other characters) from the end of a string - * Source code: ext/standard/string.c -*/ - -/* - * Testing chop() : error conditions -*/ - -echo "*** Testing chop() : error conditions ***\n"; - -// Zero argument -echo "\n-- Testing chop() function with Zero arguments --\n"; -var_dump( chop() ); - -// More than expected number of arguments -echo "\n-- Testing chop() function with more than expected no. of arguments --\n"; -$str = 'string_val '; -$charlist = 'string_val'; -$extra_arg = 10; - -var_dump( chop($str, $charlist, $extra_arg) ); -var_dump( $str ); - -echo "Done\n"; -?> ---EXPECTF-- -*** Testing chop() : error conditions *** - --- Testing chop() function with Zero arguments -- - -Warning: chop() expects at least 1 parameter, 0 given in %s on line %d -NULL - --- Testing chop() function with more than expected no. of arguments -- - -Warning: chop() expects at most 2 parameters, 3 given in %s on line %d -NULL -string(11) "string_val " -Done diff --git a/ext/standard/tests/strings/chunk_split_error.phpt b/ext/standard/tests/strings/chunk_split_error.phpt deleted file mode 100644 index d8a72586af..0000000000 --- a/ext/standard/tests/strings/chunk_split_error.phpt +++ /dev/null @@ -1,40 +0,0 @@ ---TEST-- -Test chunk_split() function : error conditions ---FILE-- -<?php -/* Prototype : string chunk_split(string $str [, int $chunklen [, string $ending]]) - * Description: Returns split line - * Source code: ext/standard/string.c - * Alias to functions: none -*/ - -/* -* Testing error conditions of chunk_split() with zero arguments -* and for more than expected number of arguments -*/ - -echo "*** Testing chunk_split() : error conditions ***\n"; - -// Zero arguments -echo "-- Testing chunk_split() function with Zero arguments --"; -var_dump( chunk_split() ); - -// With one more than the expected number of arguments -$str = 'Testing chunk_split'; -$chunklen = 5; -$ending = '***'; -$extra_arg = 10; -echo "-- Testing chunk_split() function with more than expected no. of arguments --"; -var_dump( chunk_split($str, $chunklen, $ending, $extra_arg) ); - -echo "Done" -?> ---EXPECTF-- -*** Testing chunk_split() : error conditions *** --- Testing chunk_split() function with Zero arguments -- -Warning: chunk_split() expects at least 1 parameter, 0 given in %s on line %d -NULL --- Testing chunk_split() function with more than expected no. of arguments -- -Warning: chunk_split() expects at most 3 parameters, 4 given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/strings/convert_uudecode_error.phpt b/ext/standard/tests/strings/convert_uudecode_error.phpt deleted file mode 100644 index 77ac18b50b..0000000000 --- a/ext/standard/tests/strings/convert_uudecode_error.phpt +++ /dev/null @@ -1,34 +0,0 @@ ---TEST-- -Test convert_uudecode() function : error conditions ---FILE-- -<?php - -/* Prototype : string convert_uudecode ( string $data ) - * Description: Decode a uuencoded string - * Source code: ext/standard/uuencode.c -*/ - -echo "*** Testing convert_uudecode() : error conditions ***\n"; - -echo "\n-- Testing convert_uudecode() function with no arguments --\n"; -var_dump( convert_uudecode() ); - -echo "\n-- Testing convert_uudecode() function with more than expected no. of arguments --\n"; -$extra_arg = 10; -var_dump( convert_uudecode(72, $extra_arg) ); - -?> -===DONE=== ---EXPECTF-- -*** Testing convert_uudecode() : error conditions *** - --- Testing convert_uudecode() function with no arguments -- - -Warning: convert_uudecode() expects exactly 1 parameter, 0 given in %s on line %d -bool(false) - --- Testing convert_uudecode() function with more than expected no. of arguments -- - -Warning: convert_uudecode() expects exactly 1 parameter, 2 given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/standard/tests/strings/convert_uuencode_error.phpt b/ext/standard/tests/strings/convert_uuencode_error.phpt deleted file mode 100644 index ec4d3f6477..0000000000 --- a/ext/standard/tests/strings/convert_uuencode_error.phpt +++ /dev/null @@ -1,34 +0,0 @@ ---TEST-- -Test convert_uuencode() function : error conditions ---FILE-- -<?php - -/* Prototype : string convert_uuencode ( string $data ) - * Description: Uuencode a string - * Source code: ext/standard/uuencode.c -*/ - -echo "*** Testing convert_uuencode() : error conditions ***\n"; - -echo "\n-- Testing chconvert_uuencoder() function with no arguments --\n"; -var_dump( convert_uuencode() ); - -echo "\n-- Testing convert_uuencode() function with more than expected no. of arguments --\n"; -$extra_arg = 10; -var_dump( convert_uuencode(72, $extra_arg) ); - -?> -===DONE=== ---EXPECTF-- -*** Testing convert_uuencode() : error conditions *** - --- Testing chconvert_uuencoder() function with no arguments -- - -Warning: convert_uuencode() expects exactly 1 parameter, 0 given in %s on line %d -bool(false) - --- Testing convert_uuencode() function with more than expected no. of arguments -- - -Warning: convert_uuencode() expects exactly 1 parameter, 2 given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/standard/tests/strings/count_chars_error.phpt b/ext/standard/tests/strings/count_chars_error.phpt deleted file mode 100644 index f87b6e532e..0000000000 --- a/ext/standard/tests/strings/count_chars_error.phpt +++ /dev/null @@ -1,36 +0,0 @@ ---TEST-- -Test count_chars() function : error conditions ---FILE-- -<?php - -/* Prototype : mixed count_chars ( string $string [, int $mode ] ) - * Description: Return information about characters used in a string - * Source code: ext/standard/string.c -*/ - -echo "*** Testing count_chars() : error conditions ***\n"; - -echo "\n-- Testing count_chars() function with no arguments --\n"; -var_dump( count_chars() ); - -echo "\n-- Testing count_chars() function with more than expected no. of arguments --\n"; -$string = "Hello World\n"; -$mode = 1; -$extra_arg = 10; -var_dump( count_chars($string, $mode, $extra_arg) ); - -?> -===DONE=== ---EXPECTF-- -*** Testing count_chars() : error conditions *** - --- Testing count_chars() function with no arguments -- - -Warning: count_chars() expects at least 1 parameter, 0 given in %s on line %d -NULL - --- Testing count_chars() function with more than expected no. of arguments -- - -Warning: count_chars() expects at most 2 parameters, 3 given in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/strings/crc32_error.phpt b/ext/standard/tests/strings/crc32_error.phpt deleted file mode 100644 index 98680cde34..0000000000 --- a/ext/standard/tests/strings/crc32_error.phpt +++ /dev/null @@ -1,41 +0,0 @@ ---TEST-- -Test crc32() function : error conditions ---FILE-- -<?php -/* Prototype : string crc32(string $str) - * Description: Calculate the crc32 polynomial of a string - * Source code: ext/standard/crc32.c - * Alias to functions: none -*/ - -/* - * Testing crc32() : error conditions -*/ - -echo "*** Testing crc32() : error conditions ***\n"; - -// Zero arguments -echo "\n-- Testing crc32() function with Zero arguments --\n"; -var_dump( crc32() ); - -//Test crc32 with one more than the expected number of arguments -echo "\n-- Testing crc32() function with more than expected no. of arguments --\n"; -$str = 'string_val'; -$extra_arg = 10; -var_dump( crc32($str, $extra_arg) ); - -echo "Done"; -?> ---EXPECTF-- -*** Testing crc32() : error conditions *** - --- Testing crc32() function with Zero arguments -- - -Warning: crc32() expects exactly 1 parameter, 0 given in %s on line %d -NULL - --- Testing crc32() function with more than expected no. of arguments -- - -Warning: crc32() expects exactly 1 parameter, 2 given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/strings/explode_error.phpt b/ext/standard/tests/strings/explode_error.phpt deleted file mode 100644 index d86e1edb1f..0000000000 --- a/ext/standard/tests/strings/explode_error.phpt +++ /dev/null @@ -1,37 +0,0 @@ ---TEST-- -Test explode() function : error conditions ---FILE-- -<?php - -/* Prototype : array explode ( string $delimiter , string $string [, int $limit ] ) - * Description: Split a string by string. - * Source code: ext/standard/string.c -*/ - -echo "*** Testing explode() : error conditions ***\n"; - -echo "\n-- Testing explode() function with no arguments --\n"; -var_dump( explode() ); - -echo "\n-- Testing explode() function with more than expected no. of arguments --\n"; -$delimiter = " "; -$string = "piece1 piece2 piece3 piece4 piece5 piece6"; -$limit = 5; -$extra_arg = 10; -var_dump( explode($delimiter, $string, $limit, $extra_arg) ); - -?> -===Done=== ---EXPECTF-- -*** Testing explode() : error conditions *** - --- Testing explode() function with no arguments -- - -Warning: explode() expects at least 2 parameters, 0 given in %s on line %d -NULL - --- Testing explode() function with more than expected no. of arguments -- - -Warning: explode() expects at most 3 parameters, 4 given in %s on line %d -NULL -===Done=== diff --git a/ext/standard/tests/strings/get_html_translation_table_error.phpt b/ext/standard/tests/strings/get_html_translation_table_error.phpt deleted file mode 100644 index 5adfe98478..0000000000 --- a/ext/standard/tests/strings/get_html_translation_table_error.phpt +++ /dev/null @@ -1,29 +0,0 @@ ---TEST-- -Test get_html_translation_table() function : error conditions ---FILE-- -<?php -/* Prototype : array get_html_translation_table ( [int $table [, int $quote_style [, string charset_hint]]] ) - * Description: Returns the internal translation table used by htmlspecialchars and htmlentities - * Source code: ext/standard/html.c -*/ - -echo "*** Testing get_html_translation_table() : error conditions ***\n"; - -// More than expected number of arguments -echo "\n-- Testing get_html_translation_table() function with more than expected no. of arguments --\n"; -$table = HTML_ENTITIES; -$quote_style = ENT_COMPAT; -$extra_arg = 10; - -var_dump( get_html_translation_table($table, $quote_style, "UTF-8", $extra_arg) ); - -echo "Done\n"; -?> ---EXPECTF-- -*** Testing get_html_translation_table() : error conditions *** - --- Testing get_html_translation_table() function with more than expected no. of arguments -- - -Warning: get_html_translation_table() expects at most 3 parameters, 4 given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/strings/hebrev_error.phpt b/ext/standard/tests/strings/hebrev_error.phpt deleted file mode 100644 index a04e519db5..0000000000 --- a/ext/standard/tests/strings/hebrev_error.phpt +++ /dev/null @@ -1,34 +0,0 @@ ---TEST-- -Test hebrev() function : error conditions ---FILE-- -<?php - -/* Prototype : string hebrev ( string $hebrew_text [, int $max_chars_per_line ] ) - * Description: Convert logical Hebrew text to visual text - * Source code: ext/standard/string.c -*/ - -echo "*** Testing hebrev() : error conditions ***\n"; - -echo "\n-- Testing hebrev() function with no arguments --\n"; -var_dump( hebrev() ); - -echo "\n-- Testing hebrev() function with more than expected no. of arguments --\n"; -$extra_arg = 10; -var_dump( hebrev("Hello World", 5, $extra_arg) ); - -?> -===DONE=== ---EXPECTF-- -*** Testing hebrev() : error conditions *** - --- Testing hebrev() function with no arguments -- - -Warning: hebrev() expects at least 1 parameter, 0 given in %s on line %d -NULL - --- Testing hebrev() function with more than expected no. of arguments -- - -Warning: hebrev() expects at most 2 parameters, 3 given in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/strings/hebrevc_error.phpt b/ext/standard/tests/strings/hebrevc_error.phpt deleted file mode 100644 index 630c995b18..0000000000 --- a/ext/standard/tests/strings/hebrevc_error.phpt +++ /dev/null @@ -1,34 +0,0 @@ ---TEST-- -Test hebrevc() function : error conditions ---FILE-- -<?php - -/* Prototype : string hebrevc ( string $hebrew_text [, int $max_chars_per_line ] ) - * Description: Convert logical Hebrew text to visual text - * Source code: ext/standard/string.c -*/ - -echo "*** Testing hebrevc() : error conditions ***\n"; - -echo "\n-- Testing hebrevc() function with no arguments --\n"; -var_dump( hebrevc() ); - -echo "\n-- Testing hebrevc() function with more than expected no. of arguments --\n"; -$extra_arg = 10; -var_dump( hebrevc("Hello World", 5, $extra_arg) ); - -?> -===DONE=== ---EXPECTF-- -*** Testing hebrevc() : error conditions *** - --- Testing hebrevc() function with no arguments -- - -Warning: hebrevc() expects at least 1 parameter, 0 given in %s on line %d -NULL - --- Testing hebrevc() function with more than expected no. of arguments -- - -Warning: hebrevc() expects at most 2 parameters, 3 given in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/strings/htmlspecialchars_decode_error.phpt b/ext/standard/tests/strings/htmlspecialchars_decode_error.phpt deleted file mode 100644 index 36b8e6bbec..0000000000 --- a/ext/standard/tests/strings/htmlspecialchars_decode_error.phpt +++ /dev/null @@ -1,37 +0,0 @@ ---TEST-- -Test htmlspecialchars_decode() function : error conditions ---FILE-- -<?php -/* Prototype : string htmlspecialchars_decode(string $string [, int $quote_style]) - * Description: Convert special HTML entities back to characters - * Source code: ext/standard/html.c -*/ - -echo "*** Testing htmlspecialchars_decode() : error conditions ***\n"; - -// Zero arguments -echo "\n-- Testing htmlspecialchars_decode() function with Zero arguments --\n"; -var_dump( htmlspecialchars_decode() ); - -//Test htmlspecialchars_decode with one more than the expected number of arguments -echo "\n-- Testing htmlspecialchars_decode() function with more than expected no. of arguments --\n"; -$string = "<html>hello & > < " ' world</html>"; -$quote_style = ENT_COMPAT; -$extra_arg = 10; -var_dump( htmlspecialchars_decode($string, $quote_style, $extra_arg) ); - -echo "Done"; -?> ---EXPECTF-- -*** Testing htmlspecialchars_decode() : error conditions *** - --- Testing htmlspecialchars_decode() function with Zero arguments -- - -Warning: htmlspecialchars_decode() expects at least 1 parameter, 0 given in %s on line %d -NULL - --- Testing htmlspecialchars_decode() function with more than expected no. of arguments -- - -Warning: htmlspecialchars_decode() expects at most 2 parameters, 3 given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/strings/http_build_query_error.phpt b/ext/standard/tests/strings/http_build_query_error.phpt deleted file mode 100644 index 2975d2d723..0000000000 --- a/ext/standard/tests/strings/http_build_query_error.phpt +++ /dev/null @@ -1,13 +0,0 @@ ---TEST-- -Testing error on null parameter 1 of http_build_query() ---CREDITS-- -Pawel Krynicki <pawel.krynicki [at] xsolve [dot] pl> -#testfest AmsterdamPHP 2012-06-23 ---FILE-- -<?php - -$result = http_build_query(null); - -?> ---EXPECTF-- -Warning: http_build_query() expects parameter 1 to be array, null given in %s on line %d diff --git a/ext/standard/tests/strings/md5_error.phpt b/ext/standard/tests/strings/md5_error.phpt deleted file mode 100644 index 138df1b8bd..0000000000 --- a/ext/standard/tests/strings/md5_error.phpt +++ /dev/null @@ -1,35 +0,0 @@ ---TEST-- -Test md5() function : error conditions ---FILE-- -<?php -/* Prototype : string md5 ( string $str [, bool $raw_output= false ] ) - * Description: Calculate the md5 hash of a string - * Source code: ext/standard/md5.c -*/ - -echo "*** Testing md5() : error conditions ***\n"; - -echo "\n-- Testing md5() function with no arguments --\n"; -var_dump( md5()); - -echo "\n-- Testing md5() function with more than expected no. of arguments --\n"; -$str = "Hello World"; -$raw_output = true; -$extra_arg = 10; - -var_dump(md5($str, $raw_output, $extra_arg)); -?> -===DONE== ---EXPECTF-- -*** Testing md5() : error conditions *** - --- Testing md5() function with no arguments -- - -Warning: md5() expects at least 1 parameter, 0 given in %s on line %d -NULL - --- Testing md5() function with more than expected no. of arguments -- - -Warning: md5() expects at most 2 parameters, 3 given in %s on line %d -NULL -===DONE== diff --git a/ext/standard/tests/strings/nl2br_error.phpt b/ext/standard/tests/strings/nl2br_error.phpt deleted file mode 100644 index b40e7b16a5..0000000000 --- a/ext/standard/tests/strings/nl2br_error.phpt +++ /dev/null @@ -1,34 +0,0 @@ ---TEST-- -Test nl2br() function : error conditions ---FILE-- -<?php -/* Prototype : string nl2br(string $str) - * Description: Inserts HTML line breaks before all newlines in a string. - * Source code: ext/standard/string.c -*/ - -echo "*** Testing nl2br() : error conditions ***\n"; - -// Zero arguments -echo "\n-- Testing nl2br() function with Zero arguments --"; -var_dump( nl2br() ); - -//Test nl2br with one more than the expected number of arguments -echo "\n-- Testing nl2br() function with more than expected no. of arguments --"; -$str = 'string_val'; -$extra_arg = 10; -var_dump( nl2br($str, true, $extra_arg) ); - -echo "Done"; -?> ---EXPECTF-- -*** Testing nl2br() : error conditions *** - --- Testing nl2br() function with Zero arguments -- -Warning: nl2br() expects at least 1 parameter, 0 given in %s on line %d -NULL - --- Testing nl2br() function with more than expected no. of arguments -- -Warning: nl2br() expects at most 2 parameters, 3 given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/strings/nl_langinfo_error1.phpt b/ext/standard/tests/strings/nl_langinfo_error1.phpt deleted file mode 100644 index c8f3a284bf..0000000000 --- a/ext/standard/tests/strings/nl_langinfo_error1.phpt +++ /dev/null @@ -1,40 +0,0 @@ ---TEST-- -Test nl_langinfo() function : error conditions ---SKIPIF-- -<?php -if( substr(PHP_OS, 0, 3) == 'WIN'){ - die('skip Not for Windows'); -} -?> ---FILE-- -<?php - -/* Prototype : string nl_langinfo ( int $item ) - * Description: Query language and locale information - * Source code: ext/standard/string.c -*/ - -echo "*** Testing nl_langinfo() : error conditions ***\n"; - -echo "\n-- Testing nl_langinfo() function with no arguments --\n"; -var_dump( nl_langinfo() ); - -echo "\n-- Testing nl_langinfo() function with more than expected no. of arguments --\n"; -$extra_arg = 10; -var_dump( nl_langinfo(ABDAY_2, $extra_arg) ); - -?> -===DONE=== ---EXPECTF-- -*** Testing nl_langinfo() : error conditions *** - --- Testing nl_langinfo() function with no arguments -- - -Warning: nl_langinfo() expects exactly 1 parameter, 0 given in %s on line %d -NULL - --- Testing nl_langinfo() function with more than expected no. of arguments -- - -Warning: nl_langinfo() expects exactly 1 parameter, 2 given in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/strings/nl_langinfo_variation1.phpt b/ext/standard/tests/strings/nl_langinfo_variation1.phpt deleted file mode 100644 index 180991e400..0000000000 --- a/ext/standard/tests/strings/nl_langinfo_variation1.phpt +++ /dev/null @@ -1,104 +0,0 @@ ---TEST-- -Test nl_langinfo() function : unexpected inputs for '$tem' argument ---SKIPIF-- -<?php -if( substr(PHP_OS, 0, 3) == 'WIN'){ - die('skip Not for Windows'); -} -?> ---FILE-- -<?php - -/* Prototype : string nl_langinfo ( int $item ) - * Description: Query language and locale information - * Source code: ext/standard/string.c -*/ - -echo "*** Testing nl_langinfo() : with unexpected inputs for 'item' argument ***\n"; - -$original = setlocale(LC_ALL, 'C'); - -//get an unset variable -$unset_var = 'string_val'; -unset($unset_var); - -//defining a class -class sample { - public function __toString() { - return "sample object"; - } -} - -//getting the resource -$file_handle = fopen(__FILE__, "r"); - -// array with different values for $input -$items = array ( - // integer values -/*1*/ 2147483647, - -2147483648, - -20, - - // array values -/*4*/ array(), - array(0), - array(1, 2), - - // objects -/*7*/ new sample(), - - // resource -/*8*/ $file_handle, - ); - -//defining '$input' argument -$input = "Test string"; - -// loop through with each element of the $items array to test nl_langinfo() function -$count = 1; -foreach($items as $item) { - echo "-- Iteration $count --\n"; - var_dump( nl_langinfo($item) ); - $count ++; -} - -fclose($file_handle); //closing the file handle -setlocale(LC_ALL, $original); - -?> -===DONE=== ---EXPECTF-- -*** Testing nl_langinfo() : with unexpected inputs for 'item' argument *** --- Iteration 1 -- - -Warning: nl_langinfo(): Item '2147483647' is not valid in %s on line %d -bool(false) --- Iteration 2 -- - -Warning: nl_langinfo(): Item '-2147483648' is not valid in %s on line %d -bool(false) --- Iteration 3 -- - -Warning: nl_langinfo(): Item '-20' is not valid in %s on line %d -bool(false) --- Iteration 4 -- - -Warning: nl_langinfo() expects parameter 1 to be int, array given in %s on line %d -NULL --- Iteration 5 -- - -Warning: nl_langinfo() expects parameter 1 to be int, array given in %s on line %d -NULL --- Iteration 6 -- - -Warning: nl_langinfo() expects parameter 1 to be int, array given in %s on line %d -NULL --- Iteration 7 -- - -Warning: nl_langinfo() expects parameter 1 to be int, object given in %s on line %d -NULL --- Iteration 8 -- - -Warning: nl_langinfo() expects parameter 1 to be int, resource given in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/strings/number_format_error.phpt b/ext/standard/tests/strings/number_format_error.phpt deleted file mode 100644 index 933466d12b..0000000000 --- a/ext/standard/tests/strings/number_format_error.phpt +++ /dev/null @@ -1,38 +0,0 @@ ---TEST-- -Test number_format() - wrong params test number_format() ---FILE-- -<?php -/* Prototype : string number_format ( float $number [, int $decimals ] ) - * string number_format ( float $number , int $decimals , string $dec_point , string $thousands_sep ) - * Description: Format a number with grouped thousands - * Source code: ext/standard/string.c - */ - -echo "*** Testing number_format() : error conditions ***\n"; - -echo "\n-- Testing number_format() function with less than expected no. of arguments --\n"; -number_format(); - -echo "\n-- Testing number_format() function with 3 arguments --\n"; -number_format(23,2,true); - -echo "\n-- Testing number_format() function with more than 4 arguments --\n"; -number_format(23,2,true,false,36); - -?> -===DONE=== ---EXPECTF-- -*** Testing number_format() : error conditions *** - --- Testing number_format() function with less than expected no. of arguments -- - -Warning: number_format() expects at least 1 parameter, 0 given in %s on line %d - --- Testing number_format() function with 3 arguments -- - -Warning: Wrong parameter count for number_format() in %s on line %d - --- Testing number_format() function with more than 4 arguments -- - -Warning: number_format() expects at most 4 parameters, 5 given in %s on line %d -===DONE=== diff --git a/ext/standard/tests/strings/ord_error.phpt b/ext/standard/tests/strings/ord_error.phpt deleted file mode 100644 index 455fb38972..0000000000 --- a/ext/standard/tests/strings/ord_error.phpt +++ /dev/null @@ -1,34 +0,0 @@ ---TEST-- -Test ord() function : error conditions ---FILE-- -<?php - -/* Prototype : int ord ( string $string ) - * Description: Return ASCII value of character - * Source code: ext/standard/string.c -*/ - -echo "*** Testing ord() : error conditions ***\n"; - -echo "\n-- Testing ord() function with no arguments --\n"; -var_dump( ord() ); - -echo "\n-- Testing ord() function with more than expected no. of arguments --\n"; -$extra_arg = 10; -var_dump( ord(72, $extra_arg) ); - -?> -===DONE=== ---EXPECTF-- -*** Testing ord() : error conditions *** - --- Testing ord() function with no arguments -- - -Warning: ord() expects exactly 1 parameter, 0 given in %s on line %d -NULL - --- Testing ord() function with more than expected no. of arguments -- - -Warning: ord() expects exactly 1 parameter, 2 given in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/strings/parse_str_error1.phpt b/ext/standard/tests/strings/parse_str_error1.phpt deleted file mode 100644 index 9683a7d901..0000000000 --- a/ext/standard/tests/strings/parse_str_error1.phpt +++ /dev/null @@ -1,32 +0,0 @@ ---TEST-- -Test parse_str() function : non-default arg_separator.input specified ---INI-- -arg_separator.input = "/" ---FILE-- -<?php -/* Prototype : void parse_str ( string $str [, array &$arr ] ) - * Description: Parses the string into variables - * Source code: ext/standard/string.c -*/ - -echo "*** Testing parse_str() : error conditions ***\n"; - -echo "\n-- Testing htmlentities() function with less than expected no. of arguments --\n"; -parse_str(); -echo "\n-- Testing htmlentities() function with more than expected no. of arguments --\n"; -$s1 = "first=val1&second=val2&third=val3"; -parse_str($s1, $res_array, true); - -?> -===DONE=== ---EXPECTF-- -*** Testing parse_str() : error conditions *** - --- Testing htmlentities() function with less than expected no. of arguments -- - -Warning: parse_str() expects at least 1 parameter, 0 given in %s on line %d - --- Testing htmlentities() function with more than expected no. of arguments -- - -Warning: parse_str() expects at most 2 parameters, 3 given in %s on line %d -===DONE=== diff --git a/ext/standard/tests/strings/quoted_printable_decode_error.phpt b/ext/standard/tests/strings/quoted_printable_decode_error.phpt deleted file mode 100644 index 9008f5c861..0000000000 --- a/ext/standard/tests/strings/quoted_printable_decode_error.phpt +++ /dev/null @@ -1,38 +0,0 @@ ---TEST-- -Test quoted_printable_decode() function : error conditions ---FILE-- -<?php -/* Prototype : string quoted_printable_decode ( string $str ) - * Description: Convert a quoted-printable string to an 8 bit string - * Source code: ext/standard/string.c -*/ - -echo "*** Testing quoted_printable_decode() : error conditions ***\n"; - -echo "\n-- Testing quoted_printable_decode() function with no arguments --\n"; -var_dump( quoted_printable_decode() ); - -echo "\n-- Testing quoted_printable_decode() function with more than expected no. of arguments --\n"; -$str = "=FAwow-factor=C1=d0=D5=DD=C5=CE=CE=D9=C5=0A= -=20=D4=cf=D2=C7=CF=D7=D9=C5= -=20= -=D0= -=D2=CF=C5=CB=D4=D9"; -$extra_arg = 10; -var_dump( quoted_printable_decode($str, $extra_arg) ); - -?> -===DONE=== ---EXPECTF-- -*** Testing quoted_printable_decode() : error conditions *** - --- Testing quoted_printable_decode() function with no arguments -- - -Warning: quoted_printable_decode() expects exactly 1 parameter, 0 given in %s on line %d -NULL - --- Testing quoted_printable_decode() function with more than expected no. of arguments -- - -Warning: quoted_printable_decode() expects exactly 1 parameter, 2 given in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/strings/quotemeta_error.phpt b/ext/standard/tests/strings/quotemeta_error.phpt deleted file mode 100644 index a4284eca55..0000000000 --- a/ext/standard/tests/strings/quotemeta_error.phpt +++ /dev/null @@ -1,34 +0,0 @@ ---TEST-- -Test quotemeta() function : error conditions ---FILE-- -<?php - -/* Prototype : string quotemeta ( string $str ) - * Description: Quote meta characters - * Source code: ext/standard/string.c -*/ - -echo "*** Testing quotemeta() : error conditions ***\n"; - -echo "\n-- Testing quotemeta() function with no arguments --\n"; -var_dump( quotemeta()); - -echo "\n-- Testing quotemeta() function with more than expected no. of arguments --\n"; -$extra_arg = 10; -var_dump(quotemeta("How are you ?", $extra_arg)); - -?> -===DONE=== ---EXPECTF-- -*** Testing quotemeta() : error conditions *** - --- Testing quotemeta() function with no arguments -- - -Warning: quotemeta() expects exactly 1 parameter, 0 given in %s on line %d -NULL - --- Testing quotemeta() function with more than expected no. of arguments -- - -Warning: quotemeta() expects exactly 1 parameter, 2 given in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/strings/sha1_error.phpt b/ext/standard/tests/strings/sha1_error.phpt deleted file mode 100644 index 193c64e941..0000000000 --- a/ext/standard/tests/strings/sha1_error.phpt +++ /dev/null @@ -1,35 +0,0 @@ ---TEST-- -Test sha1() function : error conditions ---FILE-- -<?php - - -/* Prototype: string sha1 ( string $str [, bool $raw_output ] ) - * Description: Calculate the sha1 hash of a string - */ - -echo "*** Testing sha1() : error conditions ***\n"; - -echo "\n-- Testing sha1() function with no arguments --\n"; -var_dump( sha1() ); - -echo "\n-- Testing sha1() function with more than expected no. of arguments --\n"; -$extra_arg = 10; -var_dump( sha1("Hello World", true, $extra_arg) ); - - -?> -===DONE=== ---EXPECTF-- -*** Testing sha1() : error conditions *** - --- Testing sha1() function with no arguments -- - -Warning: sha1() expects at least 1 parameter, 0 given in %s on line %d -NULL - --- Testing sha1() function with more than expected no. of arguments -- - -Warning: sha1() expects at most 2 parameters, 3 given in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/strings/similar_text_error.phpt b/ext/standard/tests/strings/similar_text_error.phpt deleted file mode 100644 index a5e9501337..0000000000 --- a/ext/standard/tests/strings/similar_text_error.phpt +++ /dev/null @@ -1,29 +0,0 @@ ---TEST-- -similar_text(), error tests for missing parameters ---CREDITS-- -Mats Lindh <mats at lindh.no> -#Testfest php.no ---FILE-- -<?php -/* Prototype : proto int similar_text(string str1, string str2 [, float percent]) -* Description: Calculates the similarity between two strings -* Source code: ext/standard/string.c -*/ - -$extra_arg = 10; -echo "\n-- Testing similar_text() function with more than expected no. of arguments --\n"; -similar_text("abc", "def", $percent, $extra_arg); - -echo "\n-- Testing similar_text() function with less than expected no. of arguments --\n"; -similar_text("abc"); -?> -===DONE=== ---EXPECTF-- --- Testing similar_text() function with more than expected no. of arguments -- - -Warning: similar_text() expects at most 3 parameters, 4 given in %s on line %d - --- Testing similar_text() function with less than expected no. of arguments -- - -Warning: similar_text() expects at least 2 parameters, 1 given in %s on line %d -===DONE=== diff --git a/ext/standard/tests/strings/soundex_error.phpt b/ext/standard/tests/strings/soundex_error.phpt deleted file mode 100644 index 8ff93b6d70..0000000000 --- a/ext/standard/tests/strings/soundex_error.phpt +++ /dev/null @@ -1,33 +0,0 @@ ---TEST-- -Test soundex() function : error conditions ---FILE-- -<?php -/* Prototype : string soundex ( string $str ) - * Description: Calculate the soundex key of a string - * Source code: ext/standard/string.c -*/ - -echo "\n*** Testing soundex error conditions ***"; - -echo "-- Testing soundex() function with Zero arguments --\n"; -var_dump( soundex() ); - -echo "\n\n-- Testing soundex() function with more than expected no. of arguments --\n"; -$str = "Euler"; -$extra_arg = 10; -var_dump( soundex( $str, $extra_arg) ); - -?> -===DONE=== ---EXPECTF-- -*** Testing soundex error conditions ***-- Testing soundex() function with Zero arguments -- - -Warning: soundex() expects exactly 1 parameter, 0 given in %s on line %d -NULL - - --- Testing soundex() function with more than expected no. of arguments -- - -Warning: soundex() expects exactly 1 parameter, 2 given in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/strings/sscanf_variation1.phpt b/ext/standard/tests/strings/sscanf_variation1.phpt deleted file mode 100644 index cb5cdc754a..0000000000 --- a/ext/standard/tests/strings/sscanf_variation1.phpt +++ /dev/null @@ -1,169 +0,0 @@ ---TEST-- -Test sscanf() function : usage variations - unexpected inputs for '$str' argument ---FILE-- -<?php -/* Prototype : mixed sscanf ( string $str , string $format [, mixed &$... ] ) - * Description: Parses input from a string according to a format - * Source code: ext/standard/string.c -*/ - -echo "*** Testing sscanf() function: with unexpected inputs for 'str' argument ***\n"; - -//get an unset variable -$unset_var = 'string_val'; -unset($unset_var); - -//defining a class -class sample { - public function __toString() { - return "sample object"; - } -} - -//getting the resource -$file_handle = fopen(__FILE__, "r"); - -// array with different values for $input -$inputs = array ( - - // integer values -/*1*/ 0, - 1, - -2, - 2147483647, - -2147483648, - - // float values -/*6*/ 10.5, - -20.5, - 10.1234567e10, - - // array values -/*9*/ array(), - array(0), - array(1, 2), - - // boolean values -/*12*/ true, - false, - TRUE, - FALSE, - - // null values -/*16*/ NULL, - null, - - // objects -/*18*/ new sample(), - - // resource -/*19*/ $file_handle, - - // undefined variable -/*20*/ @$undefined_var, - - // unset variable -/*21*/ @$unset_var -); - -//defining '$pad_length' argument -$format = "%s"; - -// loop through with each element of the $inputs array to test sscanf() function -$count = 1; -foreach($inputs as $input) { - echo "-- Iteration $count --\n"; - var_dump( sscanf($input, $format) ); - $count ++; -} - -fclose($file_handle); //closing the file handle - -?> -===DONE=== ---EXPECTF-- -*** Testing sscanf() function: with unexpected inputs for 'str' argument *** --- Iteration 1 -- -array(1) { - [0]=> - string(1) "0" -} --- Iteration 2 -- -array(1) { - [0]=> - string(1) "1" -} --- Iteration 3 -- -array(1) { - [0]=> - string(2) "-2" -} --- Iteration 4 -- -array(1) { - [0]=> - string(10) "2147483647" -} --- Iteration 5 -- -array(1) { - [0]=> - string(11) "-2147483648" -} --- Iteration 6 -- -array(1) { - [0]=> - string(4) "10.5" -} --- Iteration 7 -- -array(1) { - [0]=> - string(5) "-20.5" -} --- Iteration 8 -- -array(1) { - [0]=> - string(12) "101234567000" -} --- Iteration 9 -- - -Warning: sscanf() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 10 -- - -Warning: sscanf() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: sscanf() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 12 -- -array(1) { - [0]=> - string(1) "1" -} --- Iteration 13 -- -NULL --- Iteration 14 -- -array(1) { - [0]=> - string(1) "1" -} --- Iteration 15 -- -NULL --- Iteration 16 -- -NULL --- Iteration 17 -- -NULL --- Iteration 18 -- -array(1) { - [0]=> - string(6) "sample" -} --- Iteration 19 -- - -Warning: sscanf() expects parameter 1 to be string, resource given in %s on line %d -NULL --- Iteration 20 -- -NULL --- Iteration 21 -- -NULL -===DONE=== diff --git a/ext/standard/tests/strings/sscanf_variation2.phpt b/ext/standard/tests/strings/sscanf_variation2.phpt deleted file mode 100644 index dede6e8d98..0000000000 --- a/ext/standard/tests/strings/sscanf_variation2.phpt +++ /dev/null @@ -1,153 +0,0 @@ ---TEST-- -Test sscanf() function : usage variations - unexpected inputs for '$format' argument ---FILE-- -<?php -/* Prototype : mixed sscanf ( string $str , string $format [, mixed &$... ] ) - * Description: Parses input from a string according to a format - * Source code: ext/standard/string.c -*/ - -echo "*** Testing sscanf() function: with unexpected inputs for 'format' argument ***\n"; - -//get an unset variable -$unset_var = 'string_val'; -unset($unset_var); - -//defining a class -class sample { - public function __toString() { - return "sample object"; - } -} - -//getting the resource -$file_handle = fopen(__FILE__, "r"); - -// array with different values for $input -$inputs = array ( - - // integer values -/*1*/ 0, - 1, - -2, - 2147483647, - -2147483648, - - // float values -/*6*/ 10.5, - -20.5, - 10.1234567e10, - - // array values -/*9*/ array(), - array(0), - array(1, 2), - - // boolean values -/*12*/ true, - false, - TRUE, - FALSE, - - // null values -/*16*/ NULL, - null, - - // objects -/*18*/ new sample(), - - // resource -/*19*/ $file_handle, - - // undefined variable -/*20*/ @$undefined_var, - - // unset variable -/*21*/ @$unset_var -); - -//defining '$pad_length' argument -$str = "Hello World"; - -// loop through with each element of the $inputs array to test sscanf() function -$count = 1; -foreach($inputs as $input) { - echo "-- Iteration $count --\n"; - var_dump( sscanf($str, $input) ); - $count ++; -} - -fclose($file_handle); //closing the file handle - -?> -===DONE=== ---EXPECTF-- -*** Testing sscanf() function: with unexpected inputs for 'format' argument *** --- Iteration 1 -- -array(0) { -} --- Iteration 2 -- -array(0) { -} --- Iteration 3 -- -array(0) { -} --- Iteration 4 -- -array(0) { -} --- Iteration 5 -- -array(0) { -} --- Iteration 6 -- -array(0) { -} --- Iteration 7 -- -array(0) { -} --- Iteration 8 -- -array(0) { -} --- Iteration 9 -- - -Warning: sscanf() expects parameter 2 to be string, array given in %s on line %d -NULL --- Iteration 10 -- - -Warning: sscanf() expects parameter 2 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: sscanf() expects parameter 2 to be string, array given in %s on line %d -NULL --- Iteration 12 -- -array(0) { -} --- Iteration 13 -- -array(0) { -} --- Iteration 14 -- -array(0) { -} --- Iteration 15 -- -array(0) { -} --- Iteration 16 -- -array(0) { -} --- Iteration 17 -- -array(0) { -} --- Iteration 18 -- -array(0) { -} --- Iteration 19 -- - -Warning: sscanf() expects parameter 2 to be string, resource given in %s on line %d -NULL --- Iteration 20 -- -array(0) { -} --- Iteration 21 -- -array(0) { -} -===DONE=== diff --git a/ext/standard/tests/strings/str_replace_error.phpt b/ext/standard/tests/strings/str_replace_error.phpt deleted file mode 100644 index c2d1d4fe2b..0000000000 --- a/ext/standard/tests/strings/str_replace_error.phpt +++ /dev/null @@ -1,41 +0,0 @@ ---TEST-- -Test str_replace() function error conditions ---INI-- -precision=14 ---FILE-- -<?php -/* - Prototype: mixed str_replace(mixed $search, mixed $replace, - mixed $subject [, int &$count]); - Description: Replace all occurrences of the search string with - the replacement string -*/ - - -echo "\n*** Testing str_replace error conditions ***"; -/* Invalid arguments */ -var_dump( str_replace() ); -var_dump( str_replace("") ); -var_dump( str_replace(NULL) ); -var_dump( str_replace(1, 2) ); -var_dump( str_replace(1,2,3,$var,5) ); - -?> -===DONE=== ---EXPECTF-- -*** Testing str_replace error conditions *** -Warning: str_replace() expects at least 3 parameters, 0 given in %sstr_replace_error.php on line 12 -NULL - -Warning: str_replace() expects at least 3 parameters, 1 given in %sstr_replace_error.php on line 13 -NULL - -Warning: str_replace() expects at least 3 parameters, 1 given in %sstr_replace_error.php on line 14 -NULL - -Warning: str_replace() expects at least 3 parameters, 2 given in %sstr_replace_error.php on line 15 -NULL - -Warning: str_replace() expects at most 4 parameters, 5 given in %sstr_replace_error.php on line 16 -NULL -===DONE=== diff --git a/ext/standard/tests/strings/str_rot13_error.phpt b/ext/standard/tests/strings/str_rot13_error.phpt deleted file mode 100644 index ee0ea4165e..0000000000 --- a/ext/standard/tests/strings/str_rot13_error.phpt +++ /dev/null @@ -1,32 +0,0 @@ ---TEST-- -Test str_rot13() function : error conditions ---FILE-- -<?php -/* Prototype : string str_rot13 ( string $str ) - * Description: Perform the rot13 transform on a string - * Source code: ext/standard/string.c -*/ -echo "*** Testing str_rot13() : error conditions ***\n"; - -echo "-- Testing str_rot13() function with Zero arguments --\n"; -var_dump( str_rot13() ); - -echo "\n\n-- Testing str_rot13() function with more than expected no. of arguments --\n"; -$str = "str_rot13() tests starting"; -$extra_arg = 10; -var_dump( str_rot13( $str, $extra_arg) ); -?> -===DONE=== ---EXPECTF-- -*** Testing str_rot13() : error conditions *** --- Testing str_rot13() function with Zero arguments -- - -Warning: str_rot13() expects exactly 1 parameter, 0 given in %s on line %d -NULL - - --- Testing str_rot13() function with more than expected no. of arguments -- - -Warning: str_rot13() expects exactly 1 parameter, 2 given in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/strings/str_shuffle_error.phpt b/ext/standard/tests/strings/str_shuffle_error.phpt deleted file mode 100644 index 46911407f0..0000000000 --- a/ext/standard/tests/strings/str_shuffle_error.phpt +++ /dev/null @@ -1,33 +0,0 @@ ---TEST-- -Test str_shuffle() function : error conditions ---FILE-- -<?php - -/* Prototype : string str_shuffle ( string $str ) - * Description: Randomly shuffles a string - * Source code: ext/standard/string.c -*/ -echo "*** Testing str_shuffle() : error conditions ***\n"; - -echo "\n-- Testing str_shuffle() function with no arguments --\n"; -var_dump( str_shuffle() ); - -echo "\n-- Testing str_shuffle() function with more than expected no. of arguments --\n"; -$extra_arg = 10; -var_dump( str_shuffle("Hello World", $extra_arg) ); - -?> -===DONE=== ---EXPECTF-- -*** Testing str_shuffle() : error conditions *** - --- Testing str_shuffle() function with no arguments -- - -Warning: str_shuffle() expects exactly 1 parameter, 0 given in %s on line %d -NULL - --- Testing str_shuffle() function with more than expected no. of arguments -- - -Warning: str_shuffle() expects exactly 1 parameter, 2 given in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/strings/str_split_error.phpt b/ext/standard/tests/strings/str_split_error.phpt deleted file mode 100644 index 1a4558e680..0000000000 --- a/ext/standard/tests/strings/str_split_error.phpt +++ /dev/null @@ -1,38 +0,0 @@ ---TEST-- -Test str_split() function : error conditions ---FILE-- -<?php -/* Prototype : array str_split(string $str [, int $split_length]) - * Description: Convert a string to an array. If split_length is - specified, break the string down into chunks each - split_length characters long. - * Source code: ext/standard/string.c - * Alias to functions: none -*/ - -echo "*** Testing str_split() : error conditions ***\n"; - -// Zero arguments -echo "-- Testing str_split() function with Zero arguments --\n"; -var_dump( str_split() ); - -//Test str_split with one more than the expected number of arguments -echo "-- Testing str_split() function with more than expected no. of arguments --\n"; -$str = 'This is error testcase'; -$split_length = 4; -$extra_arg = 10; -var_dump( str_split( $str, $split_length, $extra_arg) ); - -echo "Done" -?> ---EXPECTF-- -*** Testing str_split() : error conditions *** --- Testing str_split() function with Zero arguments -- - -Warning: str_split() expects at least 1 parameter, 0 given in %s on line %d -NULL --- Testing str_split() function with more than expected no. of arguments -- - -Warning: str_split() expects at most 2 parameters, 3 given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/strings/strcoll_error.phpt b/ext/standard/tests/strings/strcoll_error.phpt deleted file mode 100644 index 56466bb63e..0000000000 --- a/ext/standard/tests/strings/strcoll_error.phpt +++ /dev/null @@ -1,46 +0,0 @@ ---TEST-- -Test strcoll() function : error conditions ---SKIPIF-- -<?php if (!function_exists('strcoll')) die('skip strcoll function not available') ?> ---FILE-- -<?php -/* Prototype: int strcoll ( string $str1 , string $str2 ) - Description: Locale based string comparison -*/ - -echo "*** Testing strcoll() : error conditions ***\n"; - -echo "\n-- Testing strcoll() function with no arguments --\n"; -var_dump( strcoll() ); -var_dump( strcoll("") ); - -echo "\n-- Testing strcoll() function with one argument --\n"; -var_dump( strcoll("Hello World") ); - -echo "\n-- Testing strcoll() function with more than expected no. of arguments --\n"; -$extra_arg = 10; -var_dump( strcoll("Hello World", "World", $extra_arg) ); - -?> -===Done=== ---EXPECTF-- -*** Testing strcoll() : error conditions *** - --- Testing strcoll() function with no arguments -- - -Warning: strcoll() expects exactly 2 parameters, 0 given in %s on line %d -NULL - -Warning: strcoll() expects exactly 2 parameters, 1 given in %s on line %d -NULL - --- Testing strcoll() function with one argument -- - -Warning: strcoll() expects exactly 2 parameters, 1 given in %s on line %d -NULL - --- Testing strcoll() function with more than expected no. of arguments -- - -Warning: strcoll() expects exactly 2 parameters, 3 given in %s on line %d -NULL -===Done=== diff --git a/ext/standard/tests/strings/strcspn_error.phpt b/ext/standard/tests/strings/strcspn_error.phpt deleted file mode 100644 index ebb7f9f0d0..0000000000 --- a/ext/standard/tests/strings/strcspn_error.phpt +++ /dev/null @@ -1,57 +0,0 @@ ---TEST-- -Test strcspn() function : error conditions ---FILE-- -<?php -/* Prototype : proto int strcspn(string str, string mask [, int start [, int len]]) - * Description: Finds length of initial segment consisting entirely of characters not found in mask. - If start or/and length is provided works like strcspn(substr($s,$start,$len),$bad_chars) - * Source code: ext/standard/string.c - * Alias to functions: none -*/ - -/* -* Test strcspn() : for error conditons -*/ - -echo "*** Testing strcspn() : error conditions ***\n"; - -// Zero arguments -echo "\n-- Testing strcspn() function with Zero arguments --\n"; -var_dump( strcspn() ); - -//Test strcspn with one more than the expected number of arguments -echo "\n-- Testing strcspn() function with more than expected no. of arguments --\n"; -$str = 'string_val'; -$mask = 'string_val'; -$start = 2; -$len = 20; - - -$extra_arg = 10; -var_dump( strcspn($str,$mask,$start,$len, $extra_arg) ); - -// Testing strcspn withone less than the expected number of arguments -echo "\n-- Testing strcspn() function with less than expected no. of arguments --\n"; -$str = 'string_val'; -var_dump( strcspn($str) ); - -echo "Done" -?> ---EXPECTF-- -*** Testing strcspn() : error conditions *** - --- Testing strcspn() function with Zero arguments -- - -Warning: strcspn() expects at least 2 parameters, 0 given in %s on line %d -NULL - --- Testing strcspn() function with more than expected no. of arguments -- - -Warning: strcspn() expects at most 4 parameters, 5 given in %s on line %d -NULL - --- Testing strcspn() function with less than expected no. of arguments -- - -Warning: strcspn() expects at least 2 parameters, 1 given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/strings/strip_tags_error.phpt b/ext/standard/tests/strings/strip_tags_error.phpt deleted file mode 100644 index 25f703c3c0..0000000000 --- a/ext/standard/tests/strings/strip_tags_error.phpt +++ /dev/null @@ -1,40 +0,0 @@ ---TEST-- -Test strip_tags() function : error conditions ---INI-- -short_open_tag = on ---FILE-- -<?php -/* Prototype : string strip_tags(string $str [, string $allowable_tags]) - * Description: Strips HTML and PHP tags from a string - * Source code: ext/standard/string.c -*/ - - -echo "*** Testing strip_tags() : error conditions ***\n"; - -// Zero arguments -echo "\n-- Testing strip_tags() function with Zero arguments --\n"; -var_dump( strip_tags() ); - -//Test strip_tags with one more than the expected number of arguments -echo "\n-- Testing strip_tags() function with more than expected no. of arguments --\n"; -$str = "<html>hello</html>"; -$allowable_tags = "<html>"; -$extra_arg = 10; -var_dump( strip_tags($str, $allowable_tags, $extra_arg) ); - -echo "Done"; -?> ---EXPECTF-- -*** Testing strip_tags() : error conditions *** - --- Testing strip_tags() function with Zero arguments -- - -Warning: strip_tags() expects at least 1 parameter, 0 given in %s on line %d -NULL - --- Testing strip_tags() function with more than expected no. of arguments -- - -Warning: strip_tags() expects at most 2 parameters, 3 given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/strings/stripcslashes_error.phpt b/ext/standard/tests/strings/stripcslashes_error.phpt deleted file mode 100644 index 174da56443..0000000000 --- a/ext/standard/tests/strings/stripcslashes_error.phpt +++ /dev/null @@ -1,34 +0,0 @@ ---TEST-- -Test stripcslashes() function : error conditions ---FILE-- -<?php - -/* Prototype : string stripcslashes ( string $str ) - * Description: Returns a string with backslashes stripped off. Recognizes C-like \n, \r ..., - * octal and hexadecimal representation. - * Source code: ext/standard/string.c -*/ - -echo "*** Testing stripcslashes() : unexpected number of arguments ***"; - - -echo "\n-- Testing stripcslashes() function with no arguments --\n"; -var_dump( stripcslashes() ); - -echo "\n-- Testing stripcslashes() function with more than expected no. of arguments --\n"; -$extra_arg = 10; -var_dump( stripcslashes("abc def", $extra_arg) ); -?> -===DONE=== ---EXPECTF-- -*** Testing stripcslashes() : unexpected number of arguments *** --- Testing stripcslashes() function with no arguments -- - -Warning: stripcslashes() expects exactly 1 parameter, 0 given in %s on line %d -NULL - --- Testing stripcslashes() function with more than expected no. of arguments -- - -Warning: stripcslashes() expects exactly 1 parameter, 2 given in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/strings/stripos_variation15.phpt b/ext/standard/tests/strings/stripos_variation15.phpt deleted file mode 100644 index f8d4f029fe..0000000000 --- a/ext/standard/tests/strings/stripos_variation15.phpt +++ /dev/null @@ -1,185 +0,0 @@ ---TEST-- -Test stripos() function : usage variations - unexpected inputs for 'haystack', 'needle' & 'offset' arguments ---SKIPIF-- -<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only"); ---FILE-- -<?php -/* Prototype : int stripos ( string $haystack, string $needle [, int $offset] ); - * Description: Find position of first occurrence of a case-insensitive string - * Source code: ext/standard/string.c -*/ - -/* Test stripos() function with unexpected inputs for 'haystack', 'needle' & 'offset' arguments */ - -echo "*** Testing stripos() function with unexpected values for haystack, needle & offset ***\n"; - -// get an unset variable -$unset_var = 'string_val'; -unset($unset_var); - -// defining a class -class sample { - public function __toString() { - return "object"; - } -} - -//getting the resource -$file_handle = fopen(__FILE__, "r"); - -// array with different values -$values = array ( - - // integer values - 0, - 1, - 12345, - -2345, - - // float values - 10.5, - -10.5, - 10.5e10, - 10.6E-10, - .5, - - // array values - array(), - array(0), - array(1), - array(1, 2), - array('color' => 'red', 'item' => 'pen'), - - // boolean values - true, - false, - TRUE, - FALSE, - - // objects - new sample(), - - // empty string - "", - '', - - // null values - NULL, - null, - - //resource - $file_handle, - - // undefined variable - @$undefined_var, - - // unset variable - @$unset_var -); - - -// loop through each element of the array and check the working of stripos() -$counter = 1; -for($index = 0; $index < count($values); $index ++) { - echo "-- Iteration $counter --\n"; - var_dump( stripos($values[$index], $values[$index], $values[$index]) ); - $counter ++; -} - -echo "*** Done ***"; -?> ---EXPECTF-- -*** Testing stripos() function with unexpected values for haystack, needle & offset *** --- Iteration 1 -- - -Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d -bool(false) --- Iteration 2 -- - -Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d -bool(false) --- Iteration 3 -- - -Warning: stripos(): Offset not contained in string in %s on line %d -bool(false) --- Iteration 4 -- - -Warning: stripos(): Offset not contained in string in %s on line %d -bool(false) --- Iteration 5 -- - -Warning: stripos(): Offset not contained in string in %s on line %d -bool(false) --- Iteration 6 -- - -Warning: stripos(): Offset not contained in string in %s on line %d -bool(false) --- Iteration 7 -- - -Warning: stripos(): Offset not contained in string in %s on line %d -bool(false) --- Iteration 8 -- - -Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d -bool(false) --- Iteration 9 -- - -Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d -bool(false) --- Iteration 10 -- - -Warning: stripos() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: stripos() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: stripos() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 13 -- - -Warning: stripos() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 14 -- - -Warning: stripos() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 15 -- - -Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d -bool(false) --- Iteration 16 -- -bool(false) --- Iteration 17 -- - -Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d -bool(false) --- Iteration 18 -- -bool(false) --- Iteration 19 -- - -Warning: stripos() expects parameter 3 to be int, object given in %s on line %d -NULL --- Iteration 20 -- - -Warning: stripos() expects parameter 3 to be int, string given in %s on line %d -NULL --- Iteration 21 -- - -Warning: stripos() expects parameter 3 to be int, string given in %s on line %d -NULL --- Iteration 22 -- -bool(false) --- Iteration 23 -- -bool(false) --- Iteration 24 -- - -Warning: stripos() expects parameter 1 to be string, resource given in %s on line %d -NULL --- Iteration 25 -- -bool(false) --- Iteration 26 -- -bool(false) -*** Done *** diff --git a/ext/standard/tests/strings/stripslashes_error.phpt b/ext/standard/tests/strings/stripslashes_error.phpt deleted file mode 100644 index 81b9889fc4..0000000000 --- a/ext/standard/tests/strings/stripslashes_error.phpt +++ /dev/null @@ -1,43 +0,0 @@ ---TEST-- -Test stripslashes() function : error conditions ---FILE-- -<?php -/* Prototype : string stripslashes ( string $str ) - * Description: Returns an un-quoted string - * Source code: ext/standard/string.c -*/ - -/* - * Testing stripslashes() for error conditions -*/ - -echo "*** Testing stripslashes() : error conditions ***\n"; - -// Zero argument -echo "\n-- Testing stripslashes() function with Zero arguments --\n"; -var_dump( stripslashes() ); - -// More than expected number of arguments -echo "\n-- Testing stripslashes() function with more than expected no. of arguments --\n"; -$str = '\"hello\"\"world\"'; -$extra_arg = 10; - -var_dump( stripslashes($str, $extra_arg) ); -var_dump( $str ); - -echo "Done\n"; -?> ---EXPECTF-- -*** Testing stripslashes() : error conditions *** - --- Testing stripslashes() function with Zero arguments -- - -Warning: stripslashes() expects exactly 1 parameter, 0 given in %s on line %d -NULL - --- Testing stripslashes() function with more than expected no. of arguments -- - -Warning: stripslashes() expects exactly 1 parameter, 2 given in %s on line %d -NULL -string(18) "\"hello\"\"world\"" -Done diff --git a/ext/standard/tests/strings/strlen_variation1.phpt b/ext/standard/tests/strings/strlen_variation1.phpt deleted file mode 100644 index f1d6b6b978..0000000000 --- a/ext/standard/tests/strings/strlen_variation1.phpt +++ /dev/null @@ -1,137 +0,0 @@ ---TEST-- -Test strlen() function : usage variations - unexpected input for '$string' argument ---FILE-- -<?php - -/* Prototype : int strlen ( string $string ) - * Description: Get string length - * Source code: ext/standard/string.c -*/ - -echo "*** Testing strlen() : with unexpected input for 'string' argument ***\n"; - -//get an unset variable -$unset_var = 'string_val'; -unset($unset_var); - -//defining a class -class sample { - public function __toString() { - return "sample object"; - } -} - -//getting the resource -$file_handle = fopen(__FILE__, "r"); - -// array with different values for $input -$inputs = array ( - - // integer values -/*1*/ 0, - 1, - -2, - 2147483647, - -2147483648, - - // float values -/*6*/ 10.5, - -20.5, - 10.1234567e10, - - // array values -/*9*/ array(), - array(0), - array(1, 2), - - // boolean values -/*12*/ true, - false, - TRUE, - FALSE, - - // null values -/*16*/ NULL, - null, - - // objects -/*18*/ new sample(), - - // resource -/*19*/ $file_handle, - - // undefined variable -/*20*/ @$undefined_var, - - // unset variable -/*21*/ @$unset_var -); - -//defining '$pad_length' argument -$pad_length = "20"; - -// loop through with each element of the $inputs array to test strlen() function -$count = 1; -foreach($inputs as $input) { - echo "-- Iteration $count --\n"; - var_dump( strlen($input) ); - $count ++; -} - -fclose($file_handle); //closing the file handle - -?> -===DONE=== ---EXPECTF-- -*** Testing strlen() : with unexpected input for 'string' argument *** --- Iteration 1 -- -int(1) --- Iteration 2 -- -int(1) --- Iteration 3 -- -int(2) --- Iteration 4 -- -int(10) --- Iteration 5 -- -int(11) --- Iteration 6 -- -int(4) --- Iteration 7 -- -int(5) --- Iteration 8 -- -int(12) --- Iteration 9 -- - -Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 10 -- - -Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 12 -- -int(1) --- Iteration 13 -- -int(0) --- Iteration 14 -- -int(1) --- Iteration 15 -- -int(0) --- Iteration 16 -- -int(0) --- Iteration 17 -- -int(0) --- Iteration 18 -- -int(13) --- Iteration 19 -- - -Warning: strlen() expects parameter 1 to be string, resource given in %s on line %d -NULL --- Iteration 20 -- -int(0) --- Iteration 21 -- -int(0) -===DONE=== diff --git a/ext/standard/tests/strings/strnatcasecmp_error.phpt b/ext/standard/tests/strings/strnatcasecmp_error.phpt deleted file mode 100644 index 6a0fca76e9..0000000000 --- a/ext/standard/tests/strings/strnatcasecmp_error.phpt +++ /dev/null @@ -1,33 +0,0 @@ ---TEST-- -Test strnatcasecmp() function : error conditions ---FILE-- -<?php -/* Prototype : int strnatcasecmp ( string $str1 , string $str2 ) - * Description: Case insensitive string comparisons using a "natural order" algorithm - * Source code: ext/standard/string.c -*/ -echo "*** Testing strnatcasecmp() : error conditions ***\n"; - -echo "-- Testing strnatcmp() function with Zero arguments --\n"; -var_dump( strnatcasecmp() ); - -echo "\n\n-- Testing strnatcasecmp() function with more than expected no. of arguments --\n"; -$str1 = "abc1"; -$str2 = "ABC1"; -$extra_arg = 10; -var_dump( strnatcasecmp( $str1, $str2, $extra_arg) ); -?> -===DONE=== ---EXPECTF-- -*** Testing strnatcasecmp() : error conditions *** --- Testing strnatcmp() function with Zero arguments -- - -Warning: strnatcasecmp() expects exactly 2 parameters, 0 given in %s on line %d -NULL - - --- Testing strnatcasecmp() function with more than expected no. of arguments -- - -Warning: strnatcasecmp() expects exactly 2 parameters, 3 given in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/strings/strnatcmp_error.phpt b/ext/standard/tests/strings/strnatcmp_error.phpt deleted file mode 100644 index 2b6d93afee..0000000000 --- a/ext/standard/tests/strings/strnatcmp_error.phpt +++ /dev/null @@ -1,34 +0,0 @@ ---TEST-- -Test strnatcmp() function : error conditions ---FILE-- -<?php -/* Prototype : int strnatcmp ( string $str1 , string $str2 ) - * Description: String comparisons using a "natural order" algorithm - * Source code: ext/standard/string.c -*/ -echo "*** Testing strnatcmp() : error conditions ***\n"; - -echo "-- Testing strnatcmp() function with Zero arguments --\n"; -var_dump( strnatcmp() ); - -echo "\n\n-- Testing strnatcmp() function with more than expected no. of arguments --\n"; -$str1 = "abc1"; -$str2 = "ABC1"; -$extra_arg = 10; -var_dump( strnatcmp( $str1, $str2, $extra_arg) ); - -?> -===DONE=== ---EXPECTF-- -*** Testing strnatcmp() : error conditions *** --- Testing strnatcmp() function with Zero arguments -- - -Warning: strnatcmp() expects exactly 2 parameters, 0 given in %s on line %d -NULL - - --- Testing strnatcmp() function with more than expected no. of arguments -- - -Warning: strnatcmp() expects exactly 2 parameters, 3 given in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/strings/strrchr_error.phpt b/ext/standard/tests/strings/strrchr_error.phpt deleted file mode 100644 index de5a9d34de..0000000000 --- a/ext/standard/tests/strings/strrchr_error.phpt +++ /dev/null @@ -1,40 +0,0 @@ ---TEST-- -Test strrchr() function : error conditions ---FILE-- -<?php -/* Prototype : string strrchr(string $haystack, string $needle); - * Description: Finds the last occurrence of a character in a string. - * Source code: ext/standard/string.c -*/ - -echo "*** Testing strrchr() function: error conditions ***\n"; -$haystack = "Hello"; -$needle = "Hello"; -$extra_arg = "Hello"; - -echo "\n-- Testing strrchr() function with Zero arguments --"; -var_dump( strrchr() ); - -echo "\n-- Testing strrchr() function with less than expected no. of arguments --"; -var_dump( strrchr($haystack) ); - -echo "\n-- Testing strrchr() function with more than expected no. of arguments --"; -var_dump( strrchr($haystack, $needle, $extra_arg) ); - -echo "*** Done ***"; -?> ---EXPECTF-- -*** Testing strrchr() function: error conditions *** - --- Testing strrchr() function with Zero arguments -- -Warning: strrchr() expects exactly 2 parameters, 0 given in %s on line %d -NULL - --- Testing strrchr() function with less than expected no. of arguments -- -Warning: strrchr() expects exactly 2 parameters, 1 given in %s on line %d -NULL - --- Testing strrchr() function with more than expected no. of arguments -- -Warning: strrchr() expects exactly 2 parameters, 3 given in %s on line %d -NULL -*** Done *** diff --git a/ext/standard/tests/strings/strrev_error.phpt b/ext/standard/tests/strings/strrev_error.phpt deleted file mode 100644 index 2bc8a228ef..0000000000 --- a/ext/standard/tests/strings/strrev_error.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -Test strrev() function : error conditions ---FILE-- -<?php -/* Prototype : string strrev(string $str); - * Description: Reverse a string - * Source code: ext/standard/string.c -*/ - -echo "*** Testing strrev() : error conditions ***\n"; -echo "-- Testing strrev() function with Zero arguments --"; -var_dump( strrev() ); - -echo "\n-- Testing strrev() function with more than expected no. of arguments --"; -var_dump( strrev("string", 'extra_arg') ); -echo "*** Done ***"; -?> ---EXPECTF-- -*** Testing strrev() : error conditions *** --- Testing strrev() function with Zero arguments -- -Warning: strrev() expects exactly 1 parameter, 0 given in %s on line %d -NULL - --- Testing strrev() function with more than expected no. of arguments -- -Warning: strrev() expects exactly 1 parameter, 2 given in %s on line %d -NULL -*** Done *** diff --git a/ext/standard/tests/strings/strrpos_error.phpt b/ext/standard/tests/strings/strrpos_error.phpt deleted file mode 100644 index d97af99920..0000000000 --- a/ext/standard/tests/strings/strrpos_error.phpt +++ /dev/null @@ -1,34 +0,0 @@ ---TEST-- -Test strrpos() function : error conditions ---FILE-- -<?php -/* Prototype : int strrpos ( string $haystack, string $needle [, int $offset] ); - * Description: Find position of last occurrence of 'needle' in 'haystack'. - * Source code: ext/standard/string.c -*/ - -echo "*** Testing strrpos() function: error conditions ***"; -echo "\n-- With Zero arguments --"; -var_dump( strrpos() ); - -echo "\n-- With less than expected number of arguments --"; -var_dump( strrpos("String") ); - -echo "\n-- With more than expected number of arguments --"; -var_dump( strrpos("string", "String", 1, 'extra_arg') ); -echo "*** Done ***"; -?> ---EXPECTF-- -*** Testing strrpos() function: error conditions *** --- With Zero arguments -- -Warning: strrpos() expects at least 2 parameters, 0 given in %s on line %d -bool(false) - --- With less than expected number of arguments -- -Warning: strrpos() expects at least 2 parameters, 1 given in %s on line %d -bool(false) - --- With more than expected number of arguments -- -Warning: strrpos() expects at most 3 parameters, 4 given in %s on line %d -bool(false) -*** Done *** diff --git a/ext/standard/tests/strings/strspn_error.phpt b/ext/standard/tests/strings/strspn_error.phpt deleted file mode 100644 index 0cf88c25d2..0000000000 --- a/ext/standard/tests/strings/strspn_error.phpt +++ /dev/null @@ -1,57 +0,0 @@ ---TEST-- -Test strspn() function : error conditions ---FILE-- -<?php -/* Prototype : proto int strspn(string str, string mask [, int start [, int len]]) - * Description: Finds length of initial segment consisting entirely of characters found in mask. - If start or/and length is provided works like strspn(substr($s,$start,$len),$good_chars) - * Source code: ext/standard/string.c - * Alias to functions: none -*/ - -/* -* Test strspn() : for error conditons -*/ - -echo "*** Testing strspn() : error conditions ***\n"; - -// Zero arguments -echo "\n-- Testing strspn() function with Zero arguments --\n"; -var_dump( strspn() ); - -//Test strspn with one more than the expected number of arguments -echo "\n-- Testing strspn() function with more than expected no. of arguments --\n"; -$str = 'string_val'; -$mask = 'string_val'; -$start = 2; -$len = 20; - - -$extra_arg = 10; -var_dump( strspn($str,$mask,$start,$len, $extra_arg) ); - -// Testing strspn withone less than the expected number of arguments -echo "\n-- Testing strspn() function with less than expected no. of arguments --\n"; -$str = 'string_val'; -var_dump( strspn($str) ); - -echo "Done" -?> ---EXPECTF-- -*** Testing strspn() : error conditions *** - --- Testing strspn() function with Zero arguments -- - -Warning: strspn() expects at least 2 parameters, 0 given in %s on line %d -NULL - --- Testing strspn() function with more than expected no. of arguments -- - -Warning: strspn() expects at most 4 parameters, 5 given in %s on line %d -NULL - --- Testing strspn() function with less than expected no. of arguments -- - -Warning: strspn() expects at least 2 parameters, 1 given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/strings/strtok_error.phpt b/ext/standard/tests/strings/strtok_error.phpt deleted file mode 100644 index b54fbbe19b..0000000000 --- a/ext/standard/tests/strings/strtok_error.phpt +++ /dev/null @@ -1,55 +0,0 @@ ---TEST-- -Test strtok() function : error conditions ---FILE-- -<?php -/* Prototype : string strtok ( string $str, string $token ) - * Description: splits a string (str) into smaller strings (tokens), with each token being delimited by any character from token - * Source code: ext/standard/string.c -*/ - -/* - * Testing strtok() for error conditions -*/ - -echo "*** Testing strtok() : error conditions ***\n"; - -// Zero argument -echo "\n-- Testing strtok() function with Zero arguments --\n"; -var_dump( strtok() ); - -// More than expected number of arguments -echo "\n-- Testing strtok() function with more than expected no. of arguments --\n"; -$str = 'sample string'; -$token = ' '; -$extra_arg = 10; - -var_dump( strtok($str, $token, $extra_arg) ); -var_dump( $str ); - -// Less than expected number of arguments -echo "\n-- Testing strtok() with less than expected no. of arguments --\n"; -$str = 'string val'; - -var_dump( strtok($str)); -var_dump( $str ); - -echo "Done\n"; -?> ---EXPECTF-- -*** Testing strtok() : error conditions *** - --- Testing strtok() function with Zero arguments -- - -Warning: strtok() expects at least 1 parameter, 0 given in %s on line %d -NULL - --- Testing strtok() function with more than expected no. of arguments -- - -Warning: strtok() expects at most 2 parameters, 3 given in %s on line %d -NULL -string(13) "sample string" - --- Testing strtok() with less than expected no. of arguments -- -bool(false) -string(10) "string val" -Done diff --git a/ext/standard/tests/strings/strtr_error.phpt b/ext/standard/tests/strings/strtr_error.phpt deleted file mode 100644 index 0d4d157776..0000000000 --- a/ext/standard/tests/strings/strtr_error.phpt +++ /dev/null @@ -1,41 +0,0 @@ ---TEST-- -Test strtr() function : error conditions ---FILE-- -<?php -/* Prototype : string strtr(string str, string from[, string to]) - * Description: Translates characters in str using given translation tables - * Source code: ext/standard/string.c -*/ - -echo "*** Testing strtr() : error conditions ***\n"; -$str = "string"; -$from = "string"; -$to = "STRING"; -$extra_arg = "extra_argument"; - -echo "\n-- Testing strtr() function with Zero arguments --"; -var_dump( strtr() ); - -echo "\n-- Testing strtr() function with less than expected no. of arguments --"; -var_dump( strtr($str) ); - -echo "\n-- Testing strtr() function with more than expected no. of arguments --"; -var_dump( strtr($str, $from, $to, $extra_arg) ); - -echo "Done"; -?> ---EXPECTF-- -*** Testing strtr() : error conditions *** - --- Testing strtr() function with Zero arguments -- -Warning: strtr() expects at least 2 parameters, 0 given in %s on line %d -NULL - --- Testing strtr() function with less than expected no. of arguments -- -Warning: strtr() expects at least 2 parameters, 1 given in %s on line %d -NULL - --- Testing strtr() function with more than expected no. of arguments -- -Warning: strtr() expects at most 3 parameters, 4 given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/strings/ucwords_error.phpt b/ext/standard/tests/strings/ucwords_error.phpt deleted file mode 100644 index 7ada10c629..0000000000 --- a/ext/standard/tests/strings/ucwords_error.phpt +++ /dev/null @@ -1,41 +0,0 @@ ---TEST-- -Test ucwords() function : error conditions ---FILE-- -<?php -/* Prototype : string ucwords ( string $str ) - * Description: Uppercase the first character of each word in a string - * Source code: ext/standard/string.c -*/ - -echo "*** Testing ucwords() : error conditions ***\n"; - -// Zero argument -echo "\n-- Testing ucwords() function with Zero arguments --\n"; -var_dump( ucwords() ); - -// More than expected number of arguments -echo "\n-- Testing ucwords() function with more than expected no. of arguments --\n"; -$str = 'string_val'; -$extra_arg = 10; - -var_dump( ucwords($str, $extra_arg, $extra_arg) ); - -// check if there were any changes made to $str -var_dump($str); - -echo "Done\n"; -?> ---EXPECTF-- -*** Testing ucwords() : error conditions *** - --- Testing ucwords() function with Zero arguments -- - -Warning: ucwords() expects at least 1 parameter, 0 given in %s on line %d -NULL - --- Testing ucwords() function with more than expected no. of arguments -- - -Warning: ucwords() expects at most 2 parameters, 3 given in %s on line %d -NULL -string(10) "string_val" -Done diff --git a/ext/standard/tests/strings/utf8_decode_error.phpt b/ext/standard/tests/strings/utf8_decode_error.phpt deleted file mode 100644 index de2ca2b80e..0000000000 --- a/ext/standard/tests/strings/utf8_decode_error.phpt +++ /dev/null @@ -1,37 +0,0 @@ ---TEST-- -Test utf8_decode() function : error conditions ---FILE-- -<?php -/* Prototype : proto string utf8_decode(string data) - * Description: Converts a UTF-8 encoded string to ISO-8859-1 - * Source code: ext/standard/string.c - * Alias to functions: - */ - -echo "*** Testing utf8_decode() : error conditions ***\n"; - -// Zero arguments -echo "\n-- Testing utf8_decode() function with Zero arguments --\n"; -var_dump( utf8_decode() ); - -//Test utf8_decode with one more than the expected number of arguments -echo "\n-- Testing utf8_decode() function with more than expected no. of arguments --\n"; -$data = 'string_val'; -$extra_arg = 10; -var_dump( utf8_decode($data, $extra_arg) ); - -echo "Done"; -?> ---EXPECTF-- -*** Testing utf8_decode() : error conditions *** - --- Testing utf8_decode() function with Zero arguments -- - -Warning: utf8_decode() expects exactly 1 parameter, 0 given in %s on line %d -NULL - --- Testing utf8_decode() function with more than expected no. of arguments -- - -Warning: utf8_decode() expects exactly 1 parameter, 2 given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/strings/utf8_encode_error.phpt b/ext/standard/tests/strings/utf8_encode_error.phpt deleted file mode 100644 index bcc9335c58..0000000000 --- a/ext/standard/tests/strings/utf8_encode_error.phpt +++ /dev/null @@ -1,37 +0,0 @@ ---TEST-- -Test utf8_encode() function : error conditions ---FILE-- -<?php -/* Prototype : proto string utf8_encode(string data) - * Description: Encodes an ISO-8859-1 string to UTF-8 - * Source code: ext/standard/string.c - * Alias to functions: - */ - -echo "*** Testing utf8_encode() : error conditions ***\n"; - -// Zero arguments -echo "\n-- Testing utf8_encode() function with Zero arguments --\n"; -var_dump( utf8_encode() ); - -//Test utf8_encode with one more than the expected number of arguments -echo "\n-- Testing utf8_encode() function with more than expected no. of arguments --\n"; -$data = 'string_val'; -$extra_arg = 10; -var_dump( utf8_encode($data, $extra_arg) ); - -echo "Done"; -?> ---EXPECTF-- -*** Testing utf8_encode() : error conditions *** - --- Testing utf8_encode() function with Zero arguments -- - -Warning: utf8_encode() expects exactly 1 parameter, 0 given in %s on line %d -NULL - --- Testing utf8_encode() function with more than expected no. of arguments -- - -Warning: utf8_encode() expects exactly 1 parameter, 2 given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/strings/vfprintf_error2.phpt b/ext/standard/tests/strings/vfprintf_error2.phpt deleted file mode 100644 index 7da28468b3..0000000000 --- a/ext/standard/tests/strings/vfprintf_error2.phpt +++ /dev/null @@ -1,48 +0,0 @@ ---TEST-- -Test vfprintf() function : error conditions (less than expected arguments) ---CREDITS-- -Felix De Vliegher <felix.devliegher@gmail.com> ---INI-- -precision=14 ---FILE-- -<?php -/* Prototype : int vfprintf(resource stream, string format, array args) - * Description: Output a formatted string into a stream - * Source code: ext/standard/formatted_print.c - * Alias to functions: - */ - -// Open handle -$file = 'vfprintf_error2.txt'; -$fp = fopen( $file, "a+" ); - -echo "\n-- Testing vfprintf() function with less than expected no. of arguments --\n"; -$format = 'string_val'; -var_dump( vfprintf($fp, $format) ); -var_dump( vfprintf( $fp ) ); -var_dump( vfprintf() ); - -// Close handle -fclose($fp); - -?> -===DONE=== ---CLEAN-- -<?php - -$file = 'vfprintf_error2.txt'; -unlink( $file ); - -?> ---EXPECTF-- --- Testing vfprintf() function with less than expected no. of arguments -- - -Warning: Wrong parameter count for vfprintf() in %s on line %d -NULL - -Warning: Wrong parameter count for vfprintf() in %s on line %d -NULL - -Warning: Wrong parameter count for vfprintf() in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/strings/vprintf_error.phpt b/ext/standard/tests/strings/vprintf_error.phpt deleted file mode 100644 index 070b1b086c..0000000000 --- a/ext/standard/tests/strings/vprintf_error.phpt +++ /dev/null @@ -1,46 +0,0 @@ ---TEST-- -Test vprintf() function : error conditions ---FILE-- -<?php -/* Prototype : int vprintf(string $format , array $args) - * Description: Output a formatted string - * Source code: ext/standard/formatted_print.c - */ - -echo "*** Testing vprintf() : error conditions ***\n"; - -// initialising the required variables -$format = "%s"; -$args = array("hello"); -$extra_arg = "extra arg"; - -// Zero arguments -echo "\n-- Testing vprintf() function with Zero arguments --\n"; -var_dump( vprintf() ); - -echo "\n-- Testing vprintf() function with less than expected no. of arguments --\n"; -var_dump( vprintf($format) ); - -echo "\n-- testing vprintf() function with more than expected no. of arguments --\n"; -var_dump( vprintf($format, $args, $extra_arg) ); - -?> -===DONE=== ---EXPECTF-- -*** Testing vprintf() : error conditions *** - --- Testing vprintf() function with Zero arguments -- - -Warning: vprintf() expects exactly 2 parameters, 0 given in %s on line %d -bool(false) - --- Testing vprintf() function with less than expected no. of arguments -- - -Warning: vprintf() expects exactly 2 parameters, 1 given in %s on line %d -bool(false) - --- testing vprintf() function with more than expected no. of arguments -- - -Warning: vprintf() expects exactly 2 parameters, 3 given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/standard/tests/strings/vsprintf_error.phpt b/ext/standard/tests/strings/vsprintf_error.phpt deleted file mode 100644 index 2fe85f09f4..0000000000 --- a/ext/standard/tests/strings/vsprintf_error.phpt +++ /dev/null @@ -1,46 +0,0 @@ ---TEST-- -Test vsprintf() function : error conditions ---FILE-- -<?php -/* Prototype : string vsprintf(string $format , array $args) - * Description: Return a formatted string - * Source code: ext/standard/formatted_print.c - */ - -echo "*** Testing vsprintf() : error conditions ***\n"; - -// initialising the required variables -$format = "%s"; -$args = array("hello"); -$extra_arg = "extra arg"; - -// Zero arguments -echo "\n-- Testing vsprintf() function with Zero arguments --\n"; -var_dump( vsprintf() ); - -echo "\n-- Testing vsprintf() function with less than expected no. of arguments --\n"; -var_dump( vsprintf($format) ); - -echo "\n-- testing vsprintf() function with more than expected no. of arguments --\n"; -var_dump( vsprintf($format, $args, $extra_arg) ); - -echo "Done"; -?> ---EXPECTF-- -*** Testing vsprintf() : error conditions *** - --- Testing vsprintf() function with Zero arguments -- - -Warning: vsprintf() expects exactly 2 parameters, 0 given in %s on line %d -bool(false) - --- Testing vsprintf() function with less than expected no. of arguments -- - -Warning: vsprintf() expects exactly 2 parameters, 1 given in %s on line %d -bool(false) - --- testing vsprintf() function with more than expected no. of arguments -- - -Warning: vsprintf() expects exactly 2 parameters, 3 given in %s on line %d -bool(false) -Done |