From: Nuno Lopes Date: Fri, 24 Nov 2006 20:20:51 +0000 (+0000) Subject: more tests X-Git-Tag: RELEASE_1_0_0RC1~911 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2eef6c879398b25da7bd47f47fd72ee3f7a142ee;p=php more tests --- diff --git a/ext/ftp/tests/006.phpt b/ext/ftp/tests/006.phpt new file mode 100644 index 0000000000..4d31be78c0 --- /dev/null +++ b/ext/ftp/tests/006.phpt @@ -0,0 +1,100 @@ +--TEST-- +FTP with bogus parameters +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: ftp_connect() expects parameter 1 to be string, array given in %s006.php on line 4 +NULL + +Warning: ftp_connect(): Timeout has to be greater than 0 in %s006.php on line 5 +bool(false) + +Warning: ftp_raw() expects exactly 2 parameters, 1 given in %s006.php on line 6 +NULL + +Warning: ftp_mkdir() expects exactly 2 parameters, 1 given in %s006.php on line 7 +NULL + +Warning: ftp_rmdir() expects exactly 2 parameters, 1 given in %s006.php on line 8 +NULL + +Warning: ftp_nlist() expects exactly 2 parameters, 1 given in %s006.php on line 9 +NULL + +Warning: ftp_rawlist() expects at least 2 parameters, 1 given in %s006.php on line 10 +NULL + +Warning: ftp_fget() expects at least 4 parameters, 1 given in %s006.php on line 11 +NULL + +Warning: ftp_nb_fget() expects at least 4 parameters, 1 given in %s006.php on line 12 +NULL + +Warning: ftp_nb_get() expects at least 4 parameters, 1 given in %s006.php on line 13 +NULL + +Warning: ftp_pasv() expects exactly 2 parameters, 1 given in %s006.php on line 14 +NULL + +Warning: ftp_nb_continue() expects exactly 1 parameter, 0 given in %s006.php on line 15 +NULL + +Warning: ftp_fput() expects at least 4 parameters, 0 given in %s006.php on line 16 +NULL + +Warning: ftp_nb_fput() expects at least 4 parameters, 1 given in %s006.php on line 17 +NULL + +Warning: ftp_put() expects at least 4 parameters, 1 given in %s006.php on line 18 +NULL + +Warning: ftp_nb_put() expects at least 4 parameters, 1 given in %s006.php on line 19 +NULL + +Warning: ftp_size() expects exactly 2 parameters, 1 given in %s006.php on line 20 +NULL + +Warning: ftp_mdtm() expects exactly 2 parameters, 1 given in %s006.php on line 21 +NULL + +Warning: ftp_rename() expects exactly 3 parameters, 1 given in %s006.php on line 22 +NULL + +Warning: ftp_site() expects exactly 2 parameters, 1 given in %s006.php on line 23 +NULL + +Warning: ftp_set_option() expects exactly 3 parameters, 1 given in %s006.php on line 24 +NULL + +Warning: ftp_get_option() expects exactly 2 parameters, 1 given in %s006.php on line 25 +NULL diff --git a/ext/ftp/tests/bug39583.phpt b/ext/ftp/tests/bug39583.phpt index 47d9e30802..3c73758dc1 100644 --- a/ext/ftp/tests/bug39583.phpt +++ b/ext/ftp/tests/bug39583.phpt @@ -6,6 +6,7 @@ require 'skipif.inc'; ?> --FILE-- "\n", "\r" => "\n", "\n" => "\r\n"))) { + } elseif ((!empty($ascii) || isset($bug39583)) && $data === strtr($orig, array("\r\n" => "\n", "\r" => "\n", "\n" => "\r\n"))) { fputs($s, "226 Closing data Connection.\r\n"); } else { diff --git a/ext/standard/tests/general_functions/phpcredits.phpt b/ext/standard/tests/general_functions/phpcredits.phpt new file mode 100644 index 0000000000..2a8acc9a87 --- /dev/null +++ b/ext/standard/tests/general_functions/phpcredits.phpt @@ -0,0 +1,54 @@ +--TEST-- +phpcredits() +--FILE-- + +--EXPECTF-- +PHP Credits + +PHP Group +%s + +Language Design & Concept +%s + +%wPHP %d Authors%w +%s + +%wSAPI Modules%w +%s + +%wModule Authors%w +%s + +%wPHP Documentation%w +%s + +PHP Quality Assurance Team +%s + +PHP Website Team +%s +bool(true) + +Warning: phpcredits() expects parameter 1 to be long, array given in %sphpcredits.php on line 4 +NULL +-- +PHP Credits +bool(true) +-- +PHP Credits + +PHP Group +%s +bool(true) diff --git a/ext/standard/tests/general_functions/phpcredits2.phpt b/ext/standard/tests/general_functions/phpcredits2.phpt new file mode 100644 index 0000000000..e3b6e354db --- /dev/null +++ b/ext/standard/tests/general_functions/phpcredits2.phpt @@ -0,0 +1,32 @@ +--TEST-- +phpcredits() CGI +--SKIPIF-- + +--POST-- +dummy=x +--FILE-- + +--EXPECTF-- +%s +bool(true) + +Warning: phpcredits() expects parameter 1 to be long, array given in %sphpcredits2.php on line 4 +NULL +-- +

PHP Credits

+bool(true) +-- +

PHP Credits

+%sPHP Group%s +bool(true) diff --git a/ext/standard/tests/general_functions/phpinfo.phpt b/ext/standard/tests/general_functions/phpinfo.phpt new file mode 100644 index 0000000000..dab7f327c1 --- /dev/null +++ b/ext/standard/tests/general_functions/phpinfo.phpt @@ -0,0 +1,75 @@ +--TEST-- +phpinfo() +--FILE-- + +--EXPECTF-- +phpinfo() +PHP Version => %s + +System => %s +Build Date => %s +Configure Command => %s +Server API => Command Line Interface +Virtual Directory Support => %s +Configuration File (php.ini) Path => %s +PHP API => %d +PHP Extension => %d +Zend Extension => %d +Debug Build => %s +Thread Safety => %s +Zend Memory Manager => %s +IPv6 Support => %s +Registered PHP Streams => %s +Registered Stream Socket Transports => %s +Registered Stream Filters => %s + +%s + _______________________________________________________________________ + + +Configuration + +PHP Core + +%s + +Additional Modules + +%s + +Environment + +%s + +PHP Variables + +%s + +PHP License +%s +bool(true) +-- + +Warning: phpinfo() expects parameter 1 to be long, array given in %sphpinfo.php on line 5 +NULL +-- +phpinfo() +bool(true) +-- +phpinfo() + +PHP License +%s +bool(true) diff --git a/ext/standard/tests/general_functions/phpinfo2.phpt b/ext/standard/tests/general_functions/phpinfo2.phpt new file mode 100644 index 0000000000..ba9cc28ab2 --- /dev/null +++ b/ext/standard/tests/general_functions/phpinfo2.phpt @@ -0,0 +1,33 @@ +--TEST-- +phpinfo() CGI +--SKIPIF-- + +--POST-- +dummy=x +--FILE-- + +--EXPECTF-- + +%sbool(true) +-- + +Warning: phpinfo() expects parameter 1 to be long, array given in %sphpinfo2.php on line 5 +NULL +-- + +%sbool(true) +-- + +%sbool(true)