From 7effcd5f6c1cc2b1851bd0d5ef1ee06d89ba438a Mon Sep 17 00:00:00 2001 From: Zoe Slattery Date: Wed, 26 Aug 2009 17:17:58 +0000 Subject: [PATCH] Test from 2009 testfest --- Zend/tests/get_required_files.phpt | 16 ++++ ext/curl/tests/curl_copy_handle_basic.phpt | 30 ++++++++ .../tests/curl_copy_handle_variation1.phpt | 32 ++++++++ .../tests/curl_copy_handle_variation2.phpt | 44 +++++++++++ ext/dom/tests/DOMAttr_value_basic_001.phpt | 11 +++ .../DOMCharacterData_data_basic_002.phpt | 28 +++++++ .../DOMCharacterData_length_error_001.phpt | 12 +++ ...CharacterData_substringData_basic_001.phpt | 21 +++++ ext/dom/tests/DOMDocument_config_basic.phpt | 26 +++++++ ext/dom/tests/DOMDocument_encoding_basic.phpt | 52 +++++++++++++ .../DOMDocument_implementationRead_basic.phpt | 21 +++++ .../DOMDocument_preserveWhiteSpace_basic.phpt | 23 ++++++ ...ocument_preserveWhiteSpace_variations.phpt | 40 ++++++++++ .../DOMDocument_resolveExternals_basic.phpt | 49 ++++++++++++ ...OMDocument_schemaValidateSource_basic.phpt | 22 ++++++ ...MDocument_schemaValidateSource_error2.phpt | 23 ++++++ ...MDocument_schemaValidateSource_error3.phpt | 21 +++++ ...MDocument_schemaValidateSource_error4.phpt | 21 +++++ .../DOMDocument_schemaValidate_basic.phpt | 20 +++++ .../DOMDocument_schemaValidate_error1.phpt | 29 +++++++ .../DOMDocument_schemaValidate_error2.phpt | 21 +++++ .../DOMDocument_schemaValidate_error3.phpt | 21 +++++ .../DOMDocument_schemaValidate_error4.phpt | 21 +++++ .../DOMDocument_schemaValidate_error5.phpt | 25 ++++++ ...DOMDocument_strictErrorChecking_basic.phpt | 22 ++++++ .../DOMDocument_validate_on_parse_basic.phpt | 38 ++++++++++ ...MDocument_validate_on_parse_variation.phpt | 49 ++++++++++++ ext/dom/tests/book-non-conforming-schema.xsd | 17 +++++ ext/dom/tests/book-not-a-schema.xsd | 1 + ext/dom/tests/book.xsd | 17 +++++ .../domdocument_createcomment_error_001.phpt | 11 +++ ...domdocument_createentityreference_001.phpt | 13 ++++ ...domdocument_createentityreference_002.phpt | 12 +++ .../tests/imagegammacorrect_variation1.phpt | 32 ++++++++ ext/gd/tests/imagerectangle_basic.phpt | 27 +++++++ ext/gd/tests/imagerectangle_error2.phpt | 19 +++++ ext/iconv/tests/iconv_get_encoding_basic.phpt | 76 +++++++++++++++++++ ext/pcntl/tests/pcntl_fork_basic.phpt | 27 +++++++ ext/pcntl/tests/pcntl_fork_variation.phpt | 48 ++++++++++++ ext/posix/tests/posix_ctermid_basic.phpt | 18 +++++ ext/posix/tests/posix_errno_basic.phpt | 22 ++++++ ext/posix/tests/posix_errno_variation1.phpt | 22 ++++++ ext/posix/tests/posix_errno_variation2.phpt | 29 +++++++ ext/posix/tests/posix_geteuid_basic.phpt | 16 ++++ ext/posix/tests/posix_seteuid_basic.phpt | 19 +++++ ext/posix/tests/posix_seteuid_error.phpt | 32 ++++++++ ext/posix/tests/posix_seteuid_error2.phpt | 55 ++++++++++++++ ext/posix/tests/posix_seteuid_variation1.phpt | 41 ++++++++++ ext/posix/tests/posix_seteuid_variation2.phpt | 36 +++++++++ ext/posix/tests/posix_seteuid_variation4.phpt | 40 ++++++++++ ext/posix/tests/posix_seteuid_variation5.phpt | 34 +++++++++ ext/posix/tests/posix_setgid_basic.phpt | 20 +++++ ext/posix/tests/posix_setgid_error.phpt | 27 +++++++ ext/posix/tests/posix_setgid_variation1.phpt | 41 ++++++++++ ext/posix/tests/posix_setgid_variation2.phpt | 32 ++++++++ ext/posix/tests/posix_setgid_variation4.phpt | 34 +++++++++ ext/posix/tests/posix_setgid_variation5.phpt | 30 ++++++++ ext/posix/tests/posix_setgid_variation6.phpt | 51 +++++++++++++ ext/posix/tests/posix_setuid_basic.phpt | 19 +++++ ext/posix/tests/posix_setuid_error.phpt | 35 +++++++++ ext/posix/tests/posix_setuid_error2.phpt | 55 ++++++++++++++ ext/posix/tests/posix_setuid_variation1.phpt | 41 ++++++++++ ext/posix/tests/posix_setuid_variation2.phpt | 36 +++++++++ ext/posix/tests/posix_setuid_variation4.phpt | 40 ++++++++++ ext/posix/tests/posix_setuid_variation5.phpt | 34 +++++++++ ext/posix/tests/posix_ttyname_error.phpt | 29 +++++++ ext/posix/tests/posix_ttyname_variation1.phpt | 35 +++++++++ ext/posix/tests/posix_ttyname_variation2.phpt | 32 ++++++++ ext/posix/tests/posix_ttyname_variation3.phpt | 39 ++++++++++ ext/posix/tests/posix_ttyname_variation4.phpt | 34 +++++++++ ext/posix/tests/posix_ttyname_variation5.phpt | 28 +++++++ ext/posix/tests/posix_ttyname_variation6.phpt | 51 +++++++++++++ ext/posix/tests/posix_ttyname_variation7.phpt | 36 +++++++++ .../ReflectionClass_CannotClone_basic.phpt | 15 ++++ .../ReflectionFunction_isDisabled_basic.phpt | 17 +++++ ext/reflection/tests/bug47254.phpt | 42 ++++++++++ ..._addAttribute_required_attribute_name.phpt | 18 +++++ ext/sockets/tests/socket_bind.phpt | 38 ++++++++++ ext/sockets/tests/socket_bind_params.phpt | 29 +++++++ ext/sockets/tests/socket_close_params.phpt | 21 +++++ ext/sockets/tests/socket_connect_error.phpt | 33 ++++++++ ext/sockets/tests/socket_connect_params.phpt | 33 ++++++++ .../tests/socket_create_listen_params.phpt | 23 ++++++ .../tests/socket_create_listen_used.phpt | 30 ++++++++ ext/sockets/tests/socket_create_params.phpt | 24 ++++++ ext/sockets/tests/socket_getpeername.phpt | 33 ++++++++ .../tests/socket_getpeername_ipv4loop.phpt | 59 ++++++++++++++ ext/sockets/tests/socket_getsockname.phpt | 32 ++++++++ ext/sockets/tests/socket_listen_params.phpt | 21 +++++ ext/sockets/tests/socket_read_params.phpt | 28 +++++++ ext/sockets/tests/socket_set_nonblock.phpt | 24 ++++++ ext/sockets/tests/socket_write_params.phpt | 28 +++++++ .../tests/DirectoryIterator_by_reference.phpt | 14 ++++ .../DirectoryIterator_empty_constructor.phpt | 15 ++++ .../DirectoryIterator_getGroup_basic.phpt | 30 ++++++++ .../DirectoryIterator_getInode_error.phpt | 28 +++++++ .../DirectoryIterator_getOwner_basic.phpt | 29 +++++++ ext/spl/tests/SplFileInfo_getGroup_basic.phpt | 30 ++++++++ ext/spl/tests/SplFileInfo_getGroup_error.phpt | 28 +++++++ ext/spl/tests/SplFileInfo_getInode_basic.phpt | 30 ++++++++ ext/spl/tests/SplFileInfo_getInode_error.phpt | 28 +++++++ ext/spl/tests/SplFileInfo_getOwner_basic.phpt | 30 ++++++++ ext/spl/tests/SplFileInfo_getOwner_error.phpt | 28 +++++++ ext/spl/tests/SplFileInfo_getPerms_basic.phpt | 30 ++++++++ ext/spl/tests/SplFileInfo_getPerms_error.phpt | 28 +++++++ .../tests/array/key_exists_basic.phpt | 15 ++++ .../tests/array/key_exists_variation1.phpt | 15 ++++ .../tests/array/key_exists_variation2.phpt | 72 ++++++++++++++++++ .../file/file_get_contents_error001.phpt | 18 +++++ .../file/file_get_contents_error002.phpt | 18 +++++ .../get_cfg_var_variation2.phpt | 35 +++++++++ .../get_cfg_var_variation3.phpt | 42 ++++++++++ .../get_cfg_var_variation4.phpt | 37 +++++++++ .../get_cfg_var_variation5.phpt | 35 +++++++++ .../get_cfg_var_variation7.phpt | 39 ++++++++++ .../getservbyname_basic.phpt | 31 ++++++++ .../getservbyname_variation10.phpt | 36 +++++++++ .../getservbyname_variation11.phpt | 30 ++++++++ .../getservbyname_variation12.phpt | 29 +++++++ .../getservbyname_variation14.phpt | 33 ++++++++ .../getservbyname_variation2.phpt | 29 +++++++ .../getservbyname_variation3.phpt | 36 +++++++++ .../getservbyname_variation4.phpt | 31 ++++++++ .../getservbyname_variation5.phpt | 29 +++++++ .../getservbyname_variation7.phpt | 33 ++++++++ .../getservbyname_variation9.phpt | 28 +++++++ .../getservbyport_basic.phpt | 22 ++++++ .../general_functions/proc_nice_basic.phpt | 27 +++++++ .../general_functions/proc_nice_error.phpt | 21 +++++ .../proc_nice_variation1.phpt | 44 +++++++++++ .../proc_nice_variation2.phpt | 33 ++++++++ .../proc_nice_variation5.phpt | 35 +++++++++ .../proc_nice_variation6.phpt | 52 +++++++++++++ .../tests/misc/time_sleep_until_basic.phpt | 14 ++++ .../tests/misc/time_sleep_until_error1.phpt | 13 ++++ .../tests/misc/time_sleep_until_error3.phpt | 12 +++ ext/standard/tests/php_ini_loaded_file.phpt | 13 ++++ ext/standard/tests/php_logo_guid.phpt | 13 ++++ ext/standard/tests/php_real_logo_guid.phpt | 12 +++ .../tests/strings/show_source_basic.phpt | 27 +++++++ .../tests/strings/show_source_variation1.phpt | 28 +++++++ .../tests/strings/show_source_variation2.phpt | 27 +++++++ .../tests/url/get_headers_error_001.phpt | 44 +++++++++++ ext/standard/tests/zend_logo_guid.phpt | 12 +++ tests/basic/php_egg_logo_guid.phpt | 13 ++++ tests/basic/php_logo_guid.phpt | 10 +++ tests/basic/php_real_logo_guid.phpt | 12 +++ tests/basic/zend_logo_guid.phpt | 13 ++++ tests/func/time_sleep_until_basic.phpt | 15 ++++ tests/func/time_sleep_until_error2.phpt | 16 ++++ 150 files changed, 4276 insertions(+) create mode 100644 Zend/tests/get_required_files.phpt create mode 100644 ext/curl/tests/curl_copy_handle_basic.phpt create mode 100644 ext/curl/tests/curl_copy_handle_variation1.phpt create mode 100644 ext/curl/tests/curl_copy_handle_variation2.phpt create mode 100755 ext/dom/tests/DOMAttr_value_basic_001.phpt create mode 100644 ext/dom/tests/DOMCharacterData_data_basic_002.phpt create mode 100755 ext/dom/tests/DOMCharacterData_length_error_001.phpt create mode 100644 ext/dom/tests/DOMCharacterData_substringData_basic_001.phpt create mode 100644 ext/dom/tests/DOMDocument_config_basic.phpt create mode 100644 ext/dom/tests/DOMDocument_encoding_basic.phpt create mode 100644 ext/dom/tests/DOMDocument_implementationRead_basic.phpt create mode 100644 ext/dom/tests/DOMDocument_preserveWhiteSpace_basic.phpt create mode 100644 ext/dom/tests/DOMDocument_preserveWhiteSpace_variations.phpt create mode 100644 ext/dom/tests/DOMDocument_resolveExternals_basic.phpt create mode 100755 ext/dom/tests/DOMDocument_schemaValidateSource_basic.phpt create mode 100755 ext/dom/tests/DOMDocument_schemaValidateSource_error2.phpt create mode 100755 ext/dom/tests/DOMDocument_schemaValidateSource_error3.phpt create mode 100755 ext/dom/tests/DOMDocument_schemaValidateSource_error4.phpt create mode 100755 ext/dom/tests/DOMDocument_schemaValidate_basic.phpt create mode 100755 ext/dom/tests/DOMDocument_schemaValidate_error1.phpt create mode 100755 ext/dom/tests/DOMDocument_schemaValidate_error2.phpt create mode 100755 ext/dom/tests/DOMDocument_schemaValidate_error3.phpt create mode 100755 ext/dom/tests/DOMDocument_schemaValidate_error4.phpt create mode 100755 ext/dom/tests/DOMDocument_schemaValidate_error5.phpt create mode 100644 ext/dom/tests/DOMDocument_strictErrorChecking_basic.phpt create mode 100644 ext/dom/tests/DOMDocument_validate_on_parse_basic.phpt create mode 100644 ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt create mode 100755 ext/dom/tests/book-non-conforming-schema.xsd create mode 100755 ext/dom/tests/book-not-a-schema.xsd create mode 100755 ext/dom/tests/book.xsd create mode 100644 ext/dom/tests/domdocument_createcomment_error_001.phpt create mode 100644 ext/dom/tests/domdocument_createentityreference_001.phpt create mode 100644 ext/dom/tests/domdocument_createentityreference_002.phpt create mode 100644 ext/gd/tests/imagegammacorrect_variation1.phpt create mode 100755 ext/gd/tests/imagerectangle_basic.phpt create mode 100755 ext/gd/tests/imagerectangle_error2.phpt create mode 100644 ext/iconv/tests/iconv_get_encoding_basic.phpt create mode 100644 ext/pcntl/tests/pcntl_fork_basic.phpt create mode 100644 ext/pcntl/tests/pcntl_fork_variation.phpt create mode 100644 ext/posix/tests/posix_ctermid_basic.phpt create mode 100644 ext/posix/tests/posix_errno_basic.phpt create mode 100644 ext/posix/tests/posix_errno_variation1.phpt create mode 100644 ext/posix/tests/posix_errno_variation2.phpt create mode 100644 ext/posix/tests/posix_geteuid_basic.phpt create mode 100644 ext/posix/tests/posix_seteuid_basic.phpt create mode 100644 ext/posix/tests/posix_seteuid_error.phpt create mode 100644 ext/posix/tests/posix_seteuid_error2.phpt create mode 100644 ext/posix/tests/posix_seteuid_variation1.phpt create mode 100644 ext/posix/tests/posix_seteuid_variation2.phpt create mode 100644 ext/posix/tests/posix_seteuid_variation4.phpt create mode 100644 ext/posix/tests/posix_seteuid_variation5.phpt create mode 100644 ext/posix/tests/posix_setgid_basic.phpt create mode 100644 ext/posix/tests/posix_setgid_error.phpt create mode 100644 ext/posix/tests/posix_setgid_variation1.phpt create mode 100644 ext/posix/tests/posix_setgid_variation2.phpt create mode 100644 ext/posix/tests/posix_setgid_variation4.phpt create mode 100644 ext/posix/tests/posix_setgid_variation5.phpt create mode 100644 ext/posix/tests/posix_setgid_variation6.phpt create mode 100644 ext/posix/tests/posix_setuid_basic.phpt create mode 100644 ext/posix/tests/posix_setuid_error.phpt create mode 100644 ext/posix/tests/posix_setuid_error2.phpt create mode 100644 ext/posix/tests/posix_setuid_variation1.phpt create mode 100644 ext/posix/tests/posix_setuid_variation2.phpt create mode 100644 ext/posix/tests/posix_setuid_variation4.phpt create mode 100644 ext/posix/tests/posix_setuid_variation5.phpt create mode 100644 ext/posix/tests/posix_ttyname_error.phpt create mode 100644 ext/posix/tests/posix_ttyname_variation1.phpt create mode 100644 ext/posix/tests/posix_ttyname_variation2.phpt create mode 100644 ext/posix/tests/posix_ttyname_variation3.phpt create mode 100644 ext/posix/tests/posix_ttyname_variation4.phpt create mode 100644 ext/posix/tests/posix_ttyname_variation5.phpt create mode 100644 ext/posix/tests/posix_ttyname_variation6.phpt create mode 100644 ext/posix/tests/posix_ttyname_variation7.phpt create mode 100644 ext/reflection/tests/ReflectionClass_CannotClone_basic.phpt create mode 100644 ext/reflection/tests/ReflectionFunction_isDisabled_basic.phpt create mode 100644 ext/reflection/tests/bug47254.phpt create mode 100644 ext/simplexml/tests/SimpleXMLElement_addAttribute_required_attribute_name.phpt create mode 100644 ext/sockets/tests/socket_bind.phpt create mode 100644 ext/sockets/tests/socket_bind_params.phpt create mode 100644 ext/sockets/tests/socket_close_params.phpt create mode 100644 ext/sockets/tests/socket_connect_error.phpt create mode 100644 ext/sockets/tests/socket_connect_params.phpt create mode 100644 ext/sockets/tests/socket_create_listen_params.phpt create mode 100644 ext/sockets/tests/socket_create_listen_used.phpt create mode 100644 ext/sockets/tests/socket_create_params.phpt create mode 100644 ext/sockets/tests/socket_getpeername.phpt create mode 100644 ext/sockets/tests/socket_getpeername_ipv4loop.phpt create mode 100644 ext/sockets/tests/socket_getsockname.phpt create mode 100644 ext/sockets/tests/socket_listen_params.phpt create mode 100644 ext/sockets/tests/socket_read_params.phpt create mode 100644 ext/sockets/tests/socket_set_nonblock.phpt create mode 100644 ext/sockets/tests/socket_write_params.phpt create mode 100644 ext/spl/tests/DirectoryIterator_by_reference.phpt create mode 100644 ext/spl/tests/DirectoryIterator_empty_constructor.phpt create mode 100644 ext/spl/tests/DirectoryIterator_getGroup_basic.phpt create mode 100644 ext/spl/tests/DirectoryIterator_getInode_error.phpt create mode 100644 ext/spl/tests/DirectoryIterator_getOwner_basic.phpt create mode 100644 ext/spl/tests/SplFileInfo_getGroup_basic.phpt create mode 100644 ext/spl/tests/SplFileInfo_getGroup_error.phpt create mode 100644 ext/spl/tests/SplFileInfo_getInode_basic.phpt create mode 100644 ext/spl/tests/SplFileInfo_getInode_error.phpt create mode 100644 ext/spl/tests/SplFileInfo_getOwner_basic.phpt create mode 100644 ext/spl/tests/SplFileInfo_getOwner_error.phpt create mode 100644 ext/spl/tests/SplFileInfo_getPerms_basic.phpt create mode 100644 ext/spl/tests/SplFileInfo_getPerms_error.phpt create mode 100644 ext/standard/tests/array/key_exists_basic.phpt create mode 100644 ext/standard/tests/array/key_exists_variation1.phpt create mode 100644 ext/standard/tests/array/key_exists_variation2.phpt create mode 100644 ext/standard/tests/file/file_get_contents_error001.phpt create mode 100644 ext/standard/tests/file/file_get_contents_error002.phpt create mode 100644 ext/standard/tests/general_functions/get_cfg_var_variation2.phpt create mode 100644 ext/standard/tests/general_functions/get_cfg_var_variation3.phpt create mode 100644 ext/standard/tests/general_functions/get_cfg_var_variation4.phpt create mode 100644 ext/standard/tests/general_functions/get_cfg_var_variation5.phpt create mode 100644 ext/standard/tests/general_functions/get_cfg_var_variation7.phpt create mode 100755 ext/standard/tests/general_functions/getservbyname_basic.phpt create mode 100755 ext/standard/tests/general_functions/getservbyname_variation10.phpt create mode 100755 ext/standard/tests/general_functions/getservbyname_variation11.phpt create mode 100755 ext/standard/tests/general_functions/getservbyname_variation12.phpt create mode 100755 ext/standard/tests/general_functions/getservbyname_variation14.phpt create mode 100755 ext/standard/tests/general_functions/getservbyname_variation2.phpt create mode 100755 ext/standard/tests/general_functions/getservbyname_variation3.phpt create mode 100755 ext/standard/tests/general_functions/getservbyname_variation4.phpt create mode 100755 ext/standard/tests/general_functions/getservbyname_variation5.phpt create mode 100755 ext/standard/tests/general_functions/getservbyname_variation7.phpt create mode 100755 ext/standard/tests/general_functions/getservbyname_variation9.phpt create mode 100644 ext/standard/tests/general_functions/getservbyport_basic.phpt create mode 100644 ext/standard/tests/general_functions/proc_nice_basic.phpt create mode 100644 ext/standard/tests/general_functions/proc_nice_error.phpt create mode 100644 ext/standard/tests/general_functions/proc_nice_variation1.phpt create mode 100644 ext/standard/tests/general_functions/proc_nice_variation2.phpt create mode 100644 ext/standard/tests/general_functions/proc_nice_variation5.phpt create mode 100644 ext/standard/tests/general_functions/proc_nice_variation6.phpt create mode 100644 ext/standard/tests/misc/time_sleep_until_basic.phpt create mode 100644 ext/standard/tests/misc/time_sleep_until_error1.phpt create mode 100644 ext/standard/tests/misc/time_sleep_until_error3.phpt create mode 100644 ext/standard/tests/php_ini_loaded_file.phpt create mode 100644 ext/standard/tests/php_logo_guid.phpt create mode 100644 ext/standard/tests/php_real_logo_guid.phpt create mode 100644 ext/standard/tests/strings/show_source_basic.phpt create mode 100644 ext/standard/tests/strings/show_source_variation1.phpt create mode 100644 ext/standard/tests/strings/show_source_variation2.phpt create mode 100644 ext/standard/tests/url/get_headers_error_001.phpt create mode 100644 ext/standard/tests/zend_logo_guid.phpt create mode 100644 tests/basic/php_egg_logo_guid.phpt create mode 100644 tests/basic/php_logo_guid.phpt create mode 100644 tests/basic/php_real_logo_guid.phpt create mode 100644 tests/basic/zend_logo_guid.phpt create mode 100644 tests/func/time_sleep_until_basic.phpt create mode 100644 tests/func/time_sleep_until_error2.phpt diff --git a/Zend/tests/get_required_files.phpt b/Zend/tests/get_required_files.phpt new file mode 100644 index 0000000000..c2ba368884 --- /dev/null +++ b/Zend/tests/get_required_files.phpt @@ -0,0 +1,16 @@ +--TEST-- +Check if get_required_files works +--CREDITS-- +Sebastian Schürmann +sschuermann@chip.de +Testfest 2009 Munich +--FILE-- + +--EXPECTF-- +array(1) { + [0]=> + %string|unicode%(%d)%s +} diff --git a/ext/curl/tests/curl_copy_handle_basic.phpt b/ext/curl/tests/curl_copy_handle_basic.phpt new file mode 100644 index 0000000000..1a6ff41699 --- /dev/null +++ b/ext/curl/tests/curl_copy_handle_basic.phpt @@ -0,0 +1,30 @@ +--TEST-- +Test curl_copy_handle() function with basic functionality +--CREDITS-- +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing curl_copy_handle(): basic *** +bool(true) +===DONE=== diff --git a/ext/curl/tests/curl_copy_handle_variation1.phpt b/ext/curl/tests/curl_copy_handle_variation1.phpt new file mode 100644 index 0000000000..da4522192d --- /dev/null +++ b/ext/curl/tests/curl_copy_handle_variation1.phpt @@ -0,0 +1,32 @@ +--TEST-- +Test curl_copy_handle() change options in one handle +--CREDITS-- +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing curl_copy_handle(): basic *** +bool(false) +===DONE=== diff --git a/ext/curl/tests/curl_copy_handle_variation2.phpt b/ext/curl/tests/curl_copy_handle_variation2.phpt new file mode 100644 index 0000000000..924bf6a470 --- /dev/null +++ b/ext/curl/tests/curl_copy_handle_variation2.phpt @@ -0,0 +1,44 @@ +--TEST-- +Test curl_copy_handle() add options to the handles +--CREDITS-- +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--SKIPIF-- + +--COMMENT-- +the only way to test if a option is setten on a curl handle is using the curl_getinfo() function. +but this can only check on a limited amount of options... +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing curl_copy_handle(): add options after copy *** +bool(true) +bool(false) +bool(true) +bool(false) +===DONE=== diff --git a/ext/dom/tests/DOMAttr_value_basic_001.phpt b/ext/dom/tests/DOMAttr_value_basic_001.phpt new file mode 100755 index 0000000000..2a2b52121d --- /dev/null +++ b/ext/dom/tests/DOMAttr_value_basic_001.phpt @@ -0,0 +1,11 @@ +--TEST-- +Read empty $value. +--CREDIT-- +Jason Bouffard +# TestFest Atlanta 2009-05-14 +--FILE-- +value."\n"; +?> +--EXPECTF-- diff --git a/ext/dom/tests/DOMCharacterData_data_basic_002.phpt b/ext/dom/tests/DOMCharacterData_data_basic_002.phpt new file mode 100644 index 0000000000..394b316fa3 --- /dev/null +++ b/ext/dom/tests/DOMCharacterData_data_basic_002.phpt @@ -0,0 +1,28 @@ +--TEST-- +Create CDATA section and change it using DOMcreateCDATASection +--CREDITS-- +Nic Rosental nicrosental@gmail.com +# TestFest Atlanta 2009-5-28 +--SKIPIF-- + +--FILE-- +createElement('root'); +$document->appendChild($root); + +$cdata = $document->createCDATASection('t'); +$root->appendChild($cdata); +print $document->saveXML()."\n"; + +$cdata->data = 100; +print $document->saveXML()."\n"; + +?> +--EXPECT-- + + + + + diff --git a/ext/dom/tests/DOMCharacterData_length_error_001.phpt b/ext/dom/tests/DOMCharacterData_length_error_001.phpt new file mode 100755 index 0000000000..87c9377b3d --- /dev/null +++ b/ext/dom/tests/DOMCharacterData_length_error_001.phpt @@ -0,0 +1,12 @@ +--TEST-- +Invalid State Error when getting length on DOMCharacterData out of content. +--CREDIT-- +Jason Bouffard +# TestFest Atlanta 2009-05-14 +--FILE-- +length; +?> +--EXPECTF-- +Warning: main(): Invalid State Error in %s \ No newline at end of file diff --git a/ext/dom/tests/DOMCharacterData_substringData_basic_001.phpt b/ext/dom/tests/DOMCharacterData_substringData_basic_001.phpt new file mode 100644 index 0000000000..b9d73e1819 --- /dev/null +++ b/ext/dom/tests/DOMCharacterData_substringData_basic_001.phpt @@ -0,0 +1,21 @@ +--TEST-- +__DOMCharacterData::substringData pull mid section of string +--CREDITS-- +Nic Rosental nicrosental@gmail.com +# TestFest Atlanta 2009-5-28 +--SKIPIF-- + +--FILE-- +createElement('root'); +$document->appendChild($root); + +$cdata = $document->createCDATASection('testfest'); +$root->appendChild($cdata); +print $cdata->substringData(1, 6); + +?> +--EXPECT-- +estfes \ No newline at end of file diff --git a/ext/dom/tests/DOMDocument_config_basic.phpt b/ext/dom/tests/DOMDocument_config_basic.phpt new file mode 100644 index 0000000000..947743abe6 --- /dev/null +++ b/ext/dom/tests/DOMDocument_config_basic.phpt @@ -0,0 +1,26 @@ +--TEST-- +Tests DOMDocument::config read +--CREDITS-- +Chris Snyder +# TestFest 2009 NYPHP +--SKIPIF-- + +--FILE-- +config; +echo "Read config:\n"; +var_dump( $test ); + +// note -- will always be null as DOMConfiguration is not implemented in PHP + +echo "Done\n"; +?> +--EXPECT-- +DOMDocument created +Read config: +NULL +Done diff --git a/ext/dom/tests/DOMDocument_encoding_basic.phpt b/ext/dom/tests/DOMDocument_encoding_basic.phpt new file mode 100644 index 0000000000..9fc099bfe2 --- /dev/null +++ b/ext/dom/tests/DOMDocument_encoding_basic.phpt @@ -0,0 +1,52 @@ +--TEST-- +DOMDocument::$encoding - read/write tests (dom_document_encoding_read/dom_document_encoding_write) +--CREDITS-- +Hans Zaunere +# TestFest 2009 NYPHP +--SKIPIF-- + +--FILE-- +loadXML($xmlstr); + +if( !$dom ) +{ + echo "Error while parsing the document\n"; + exit; +} + +echo "Empty Encoding Read: {$dom->encoding}\n"; + +$ret = $dom->encoding = 'NYPHP DOMinatrix'; +echo "Adding invalid encoding: $ret\n"; + +$ret = $dom->encoding = 'ISO-8859-1'; +echo "Adding ISO-8859-1 encoding: $ret\n"; +echo "ISO-8859-1 Encoding Read: {$dom->encoding}\n"; + +$ret = $dom->encoding = 'UTF-8'; +echo "Adding UTF-8 encoding: $ret\n"; +echo "UTF-8 Encoding Read: {$dom->encoding}\n"; + +$ret = $dom->encoding = 'UTF-16'; +echo "Adding UTF-16 encoding: $ret\n"; +echo "UTF-16 Encoding Read: {$dom->encoding}\n"; + + +?> +--EXPECTF-- +Empty Encoding Read: + +Warning: main(): Invalid Document Encoding in %s on line %d +Adding invalid encoding: NYPHP DOMinatrix +Adding ISO-8859-1 encoding: ISO-8859-1 +ISO-8859-1 Encoding Read: ISO-8859-1 +Adding UTF-8 encoding: UTF-8 +UTF-8 Encoding Read: UTF-8 +Adding UTF-16 encoding: UTF-16 +UTF-16 Encoding Read: UTF-16 + diff --git a/ext/dom/tests/DOMDocument_implementationRead_basic.phpt b/ext/dom/tests/DOMDocument_implementationRead_basic.phpt new file mode 100644 index 0000000000..17daddf38b --- /dev/null +++ b/ext/dom/tests/DOMDocument_implementationRead_basic.phpt @@ -0,0 +1,21 @@ +--TEST-- +DOMDocument::DOMImplementation - basic test for DomDocument::DOMImplementation +--CREDITS-- +Lev Radin +# TestFest 2009 NYPHP +--SKIPIF-- + +--FILE-- +load(dirname(__FILE__)."/book.xml"); + +var_dump($doc->implementation); + + +?> +--EXPECTF-- +object(DOMImplementation)#%d (0) { +} + diff --git a/ext/dom/tests/DOMDocument_preserveWhiteSpace_basic.phpt b/ext/dom/tests/DOMDocument_preserveWhiteSpace_basic.phpt new file mode 100644 index 0000000000..a772bc8569 --- /dev/null +++ b/ext/dom/tests/DOMDocument_preserveWhiteSpace_basic.phpt @@ -0,0 +1,23 @@ +--TEST-- +DOMDocument::$preserveWhiteSpace - test ability to read and write property +--CREDITS-- +Lev Radin +# TestFest 2009 NYPHP +--SKIPIF-- + +--FILE-- +load(dirname(__FILE__)."/book.xml"); + +var_dump($doc->preserveWhiteSpace); + +$doc->preserveWhiteSpace = false; +var_dump($doc->preserveWhiteSpace); + +?> +--EXPECT-- +bool(true) +bool(false) + diff --git a/ext/dom/tests/DOMDocument_preserveWhiteSpace_variations.phpt b/ext/dom/tests/DOMDocument_preserveWhiteSpace_variations.phpt new file mode 100644 index 0000000000..e467f56aa3 --- /dev/null +++ b/ext/dom/tests/DOMDocument_preserveWhiteSpace_variations.phpt @@ -0,0 +1,40 @@ +--TEST-- +DOMDocument::$preserveWhiteSpace - test ability to read and write property +--CREDITS-- +Lev Radin +# TestFest 2009 NYPHP +--SKIPIF-- + +--FILE-- +load(dirname(__FILE__)."/book.xml"); +echo $doc->saveXML(); + + +echo "\nLoad document with preserveWhiteSpace off\n"; +$doc = new DOMDocument; +$doc->preserveWhiteSpace = false; +$doc->load(dirname(__FILE__)."/book.xml"); +echo $doc->saveXML(); + +?> +--EXPECT-- +Load document with preserveWhiteSpace on + + + + The Grapes of Wrath + John Steinbeck + + + The Pearl + John Steinbeck + + + +Load document with preserveWhiteSpace off + +The Grapes of WrathJohn SteinbeckThe PearlJohn Steinbeck diff --git a/ext/dom/tests/DOMDocument_resolveExternals_basic.phpt b/ext/dom/tests/DOMDocument_resolveExternals_basic.phpt new file mode 100644 index 0000000000..ccada3fe99 --- /dev/null +++ b/ext/dom/tests/DOMDocument_resolveExternals_basic.phpt @@ -0,0 +1,49 @@ +--TEST-- +Tests DOMDocument::resoleExternals get and set +--CREDITS-- +Chris Snyder +# TestFest 2009 NYPHP +--SKIPIF-- + +--FILE-- + + +

"Foo"

'; +$dom->loadXML($xml); +if(!$dom) { + echo "Error while parsing the document\n"; + exit; +} +echo "DOMDocument with external entities created\n"; + +$test = $dom->resolveExternals; +echo "Read initial resolveExternals:\n"; +var_dump( $test ); + +$dom->resolveExternals = TRUE; +$test = $dom->resolveExternals; +echo "Set resolveExternals to TRUE, reading again:\n"; +var_dump( $test ); + +/** + * Don't bother testing the resolveExternals functionality here, it throws warnings on html dtd + * +echo "Reloading xml with resolveExternals turned on\n"; +$dom->loadXML($xml); +$test = $dom->saveXML(); +var_dump( $test ); + */ + +echo "Done"; +?> +--EXPECT-- +DOMDocument with external entities created +Read initial resolveExternals: +bool(false) +Set resolveExternals to TRUE, reading again: +bool(true) +Done \ No newline at end of file diff --git a/ext/dom/tests/DOMDocument_schemaValidateSource_basic.phpt b/ext/dom/tests/DOMDocument_schemaValidateSource_basic.phpt new file mode 100755 index 0000000000..38bc3fa3cc --- /dev/null +++ b/ext/dom/tests/DOMDocument_schemaValidateSource_basic.phpt @@ -0,0 +1,22 @@ +--TEST-- +DomDocument::schemaValidateSource() - basic +--CREDITS-- +Daniel Convissor +# TestFest 2009 NYPHP +--SKIPIF-- + +--FILE-- +load(dirname(__FILE__)."/book.xml"); + +$xsd = file_get_contents(dirname(__FILE__)."/book.xsd"); + +$result = $doc->schemaValidateSource($xsd); +var_dump($result); + +?> +--EXPECT-- +bool(true) diff --git a/ext/dom/tests/DOMDocument_schemaValidateSource_error2.phpt b/ext/dom/tests/DOMDocument_schemaValidateSource_error2.phpt new file mode 100755 index 0000000000..41a833b5aa --- /dev/null +++ b/ext/dom/tests/DOMDocument_schemaValidateSource_error2.phpt @@ -0,0 +1,23 @@ +--TEST-- +DomDocument::schemaValidateSource() - non-conforming schema +--CREDITS-- +Daniel Convissor +# TestFest 2009 NYPHP +--SKIPIF-- + +--FILE-- +load(dirname(__FILE__)."/book.xml"); + +$xsd = file_get_contents(dirname(__FILE__)."/book-non-conforming-schema.xsd"); + +$result = $doc->schemaValidateSource($xsd); +var_dump($result); + +?> +--EXPECTF-- +Warning: DOMDocument::schemaValidateSource(): Element 'books': No matching global declaration available for the validation root. in %s.php on line %d +bool(false) diff --git a/ext/dom/tests/DOMDocument_schemaValidateSource_error3.phpt b/ext/dom/tests/DOMDocument_schemaValidateSource_error3.phpt new file mode 100755 index 0000000000..93dd792609 --- /dev/null +++ b/ext/dom/tests/DOMDocument_schemaValidateSource_error3.phpt @@ -0,0 +1,21 @@ +--TEST-- +DomDocument::schemaValidateSource() - empty string for schema string +--CREDITS-- +Daniel Convissor +# TestFest 2009 NYPHP +--SKIPIF-- + +--FILE-- +load(dirname(__FILE__)."/book.xml"); + +$result = $doc->schemaValidateSource(''); +var_dump($result); + +?> +--EXPECTF-- +Warning: DOMDocument::schemaValidateSource(): Invalid Schema source in %s.php on line %d +bool(false) diff --git a/ext/dom/tests/DOMDocument_schemaValidateSource_error4.phpt b/ext/dom/tests/DOMDocument_schemaValidateSource_error4.phpt new file mode 100755 index 0000000000..65c8d8678f --- /dev/null +++ b/ext/dom/tests/DOMDocument_schemaValidateSource_error4.phpt @@ -0,0 +1,21 @@ +--TEST-- +DomDocument::schemaValidateSource() - pass no parameters +--CREDITS-- +Daniel Convissor +# TestFest 2009 NYPHP +--SKIPIF-- + +--FILE-- +load(dirname(__FILE__)."/book.xml"); + +$result = $doc->schemaValidateSource(); +var_dump($result); + +?> +--EXPECTF-- +Warning: DOMDocument::schemaValidateSource() expects exactly 1 parameter, 0 given in %s.php on line %d +NULL diff --git a/ext/dom/tests/DOMDocument_schemaValidate_basic.phpt b/ext/dom/tests/DOMDocument_schemaValidate_basic.phpt new file mode 100755 index 0000000000..eec790de6f --- /dev/null +++ b/ext/dom/tests/DOMDocument_schemaValidate_basic.phpt @@ -0,0 +1,20 @@ +--TEST-- +DomDocument::schemaValidate() - basic +--CREDITS-- +Daniel Convissor +# TestFest 2009 NYPHP +--SKIPIF-- + +--FILE-- +load(dirname(__FILE__)."/book.xml"); + +$result = $doc->schemaValidate(dirname(__FILE__)."/book.xsd"); +var_dump($result); + +?> +--EXPECT-- +bool(true) diff --git a/ext/dom/tests/DOMDocument_schemaValidate_error1.phpt b/ext/dom/tests/DOMDocument_schemaValidate_error1.phpt new file mode 100755 index 0000000000..594c3c4291 --- /dev/null +++ b/ext/dom/tests/DOMDocument_schemaValidate_error1.phpt @@ -0,0 +1,29 @@ +--TEST-- +DomDocument::schemaValidate() - file that is not a schema +--CREDITS-- +Daniel Convissor +# TestFest 2009 NYPHP +--SKIPIF-- + +--FILE-- +load(dirname(__FILE__)."/book.xml"); + +$result = $doc->schemaValidate(dirname(__FILE__)."/book-not-a-schema.xsd"); +var_dump($result); + +?> +--EXPECTF-- +Warning: DOMDocument::schemaValidate(): %sbook-not-a-schema.xsd:1: parser error : Start tag expected, '<' not found in %s.php on line %d + +Warning: DOMDocument::schemaValidate(): Let's see what happens upon parsing a file that doesn't contain a schema. in %s.php on line %d + +Warning: DOMDocument::schemaValidate(): ^ in %s.php on line %d + +Warning: DOMDocument::schemaValidate(): Failed to parse the XML resource '%sbook-not-a-schema.xsd'. in %s.php on line %d + +Warning: DOMDocument::schemaValidate(): Invalid Schema in %s.php on line %d +bool(false) diff --git a/ext/dom/tests/DOMDocument_schemaValidate_error2.phpt b/ext/dom/tests/DOMDocument_schemaValidate_error2.phpt new file mode 100755 index 0000000000..5ffd533652 --- /dev/null +++ b/ext/dom/tests/DOMDocument_schemaValidate_error2.phpt @@ -0,0 +1,21 @@ +--TEST-- +DomDocument::schemaValidate() - non-conforming schema file +--CREDITS-- +Daniel Convissor +# TestFest 2009 NYPHP +--SKIPIF-- + +--FILE-- +load(dirname(__FILE__)."/book.xml"); + +$result = $doc->schemaValidate(dirname(__FILE__)."/book-non-conforming-schema.xsd"); +var_dump($result); + +?> +--EXPECTF-- +Warning: DOMDocument::schemaValidate(): Element 'books': No matching global declaration available for the validation root. in %s.php on line %d +bool(false) diff --git a/ext/dom/tests/DOMDocument_schemaValidate_error3.phpt b/ext/dom/tests/DOMDocument_schemaValidate_error3.phpt new file mode 100755 index 0000000000..275204f920 --- /dev/null +++ b/ext/dom/tests/DOMDocument_schemaValidate_error3.phpt @@ -0,0 +1,21 @@ +--TEST-- +DomDocument::schemaValidate() - empty string for schema file name +--CREDITS-- +Daniel Convissor +# TestFest 2009 NYPHP +--SKIPIF-- + +--FILE-- +load(dirname(__FILE__)."/book.xml"); + +$result = $doc->schemaValidate(''); +var_dump($result); + +?> +--EXPECTF-- +Warning: DOMDocument::schemaValidate(): Invalid Schema source in %s.php on line %d +bool(false) diff --git a/ext/dom/tests/DOMDocument_schemaValidate_error4.phpt b/ext/dom/tests/DOMDocument_schemaValidate_error4.phpt new file mode 100755 index 0000000000..d4817deca0 --- /dev/null +++ b/ext/dom/tests/DOMDocument_schemaValidate_error4.phpt @@ -0,0 +1,21 @@ +--TEST-- +DomDocument::schemaValidate() - pass no parameters +--CREDITS-- +Daniel Convissor +# TestFest 2009 NYPHP +--SKIPIF-- + +--FILE-- +load(dirname(__FILE__)."/book.xml"); + +$result = $doc->schemaValidate(); +var_dump($result); + +?> +--EXPECTF-- +Warning: DOMDocument::schemaValidate() expects exactly 1 parameter, 0 given in %s.php on line %d +NULL diff --git a/ext/dom/tests/DOMDocument_schemaValidate_error5.phpt b/ext/dom/tests/DOMDocument_schemaValidate_error5.phpt new file mode 100755 index 0000000000..d3f0658c1f --- /dev/null +++ b/ext/dom/tests/DOMDocument_schemaValidate_error5.phpt @@ -0,0 +1,25 @@ +--TEST-- +DomDocument::schemaValidate() - non-existant schema file +--CREDITS-- +Daniel Convissor +# TestFest 2009 NYPHP +--SKIPIF-- + +--FILE-- +load(dirname(__FILE__)."/book.xml"); + +$result = $doc->schemaValidate(dirname(__FILE__)."/non-existant-file"); +var_dump($result); + +?> +--EXPECTF-- +Warning: DOMDocument::schemaValidate(): I/O warning : failed to load external entity "%snon-existant-file" in %s.php on line %d + +Warning: DOMDocument::schemaValidate(): Failed to locate the main schema resource at '%s/non-existant-file'. in %s.php on line %d + +Warning: DOMDocument::schemaValidate(): Invalid Schema in %s.php on line %d +bool(false) diff --git a/ext/dom/tests/DOMDocument_strictErrorChecking_basic.phpt b/ext/dom/tests/DOMDocument_strictErrorChecking_basic.phpt new file mode 100644 index 0000000000..9ad55a4ad6 --- /dev/null +++ b/ext/dom/tests/DOMDocument_strictErrorChecking_basic.phpt @@ -0,0 +1,22 @@ +--TEST-- +DomDocument::$strictErrorChecking - basic test +--CREDITS-- +Vincent Tsao +# TestFest 2009 NYPHP +--SKIPIF-- + +--FILE-- +load(dirname(__FILE__)."/book.xml"); + +var_dump($doc->strictErrorChecking); + +$doc->strictErrorChecking = false; +var_dump($doc->strictErrorChecking); + +?> +--EXPECT-- +bool(true) +bool(false) diff --git a/ext/dom/tests/DOMDocument_validate_on_parse_basic.phpt b/ext/dom/tests/DOMDocument_validate_on_parse_basic.phpt new file mode 100644 index 0000000000..a95b0a3043 --- /dev/null +++ b/ext/dom/tests/DOMDocument_validate_on_parse_basic.phpt @@ -0,0 +1,38 @@ +--TEST-- +DOMDocument::$validateOnParse - read/write tests (dom_document_validate_on_parse_read/dom_document_validate_on_parse_write) +--CREDITS-- +Hans Zaunere +# TestFest 2009 NYPHP +--SKIPIF-- + +--FILE-- +loadXML($xmlstr); + +if( !$dom ) +{ + echo "Error while parsing the document\n"; + exit; +} + +echo "Checking documented default value: "; +var_dump($dom->validateOnParse); + +$dom->validateOnParse = TRUE; +echo "Setting validateOnParse to TRUE: "; +var_dump($dom->validateOnParse); + +$dom->validateOnParse = FALSE; +echo "Setting validateOnParse to FALSE: "; +var_dump($dom->validateOnParse); + +?> +--EXPECT-- +Checking documented default value: bool(false) +Setting validateOnParse to TRUE: bool(true) +Setting validateOnParse to FALSE: bool(false) + diff --git a/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt b/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt new file mode 100644 index 0000000000..6aa390ca90 --- /dev/null +++ b/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt @@ -0,0 +1,49 @@ +--TEST-- +DOMDocument::$validateOnParse - effectual determination (dom_document_validate_on_parse_read/dom_document_validate_on_parse_write) +--CREDITS-- +Hans Zaunere +# TestFest 2009 NYPHP +--SKIPIF-- + +--FILE-- +resolveExternals = TRUE; + +$dom->validateOnParse = FALSE; +echo "validateOnParse set to FALSE: \n"; +$dom->loadXML($XMLStringGood); +echo "No Error Report Above\n"; + +$BogusElement = $dom->createElement('NYPHP','DOMinatrix'); +$Body = $dom->getElementsByTagName('body')->item(0); +$Body->appendChild($BogusElement); +$XMLStringBad = $dom->saveXML(); + +echo "validateOnParse set to TRUE: \n"; +$dom->validateOnParse = TRUE; +$dom->loadXML($XMLStringBad); +echo "Error Report Above\n"; + +?> +--EXPECTF-- +validateOnParse set to FALSE: +No Error Report Above +validateOnParse set to TRUE: + +Warning: DOMDocument::loadXML(): No declaration for element NYPHP in Entity, line: %d in %s on line %d + +Warning: DOMDocument::loadXML(): Element body content does not follow the DTD, expecting (p | h1 | h2 | h3 | h4 | h5 | h6 | div | ul | ol | dl | pre | hr | blockquote | address | fieldset | table | form | noscript | ins | del | script)*, got (div div div div div NYPHP) in Entity, line: %d in %s on line %d +Error Report Above + diff --git a/ext/dom/tests/book-non-conforming-schema.xsd b/ext/dom/tests/book-non-conforming-schema.xsd new file mode 100755 index 0000000000..d1ecbef01a --- /dev/null +++ b/ext/dom/tests/book-non-conforming-schema.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/ext/dom/tests/book-not-a-schema.xsd b/ext/dom/tests/book-not-a-schema.xsd new file mode 100755 index 0000000000..d89e3bbac6 --- /dev/null +++ b/ext/dom/tests/book-not-a-schema.xsd @@ -0,0 +1 @@ +Let's see what happens upon parsing a file that doesn't contain a schema. diff --git a/ext/dom/tests/book.xsd b/ext/dom/tests/book.xsd new file mode 100755 index 0000000000..45986fc4b3 --- /dev/null +++ b/ext/dom/tests/book.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/ext/dom/tests/domdocument_createcomment_error_001.phpt b/ext/dom/tests/domdocument_createcomment_error_001.phpt new file mode 100644 index 0000000000..5df4e20473 --- /dev/null +++ b/ext/dom/tests/domdocument_createcomment_error_001.phpt @@ -0,0 +1,11 @@ +--TEST-- +DomDocument::CreateComment() - Incorrect Parameters +--CREDITS-- +Clint Priest @ PhpTek09 +--FILE-- +createComment(); +?> +--EXPECTF-- +Warning: DOMDocument::createComment() expects exactly 1 parameter, 0 given in %s \ No newline at end of file diff --git a/ext/dom/tests/domdocument_createentityreference_001.phpt b/ext/dom/tests/domdocument_createentityreference_001.phpt new file mode 100644 index 0000000000..15f7df1881 --- /dev/null +++ b/ext/dom/tests/domdocument_createentityreference_001.phpt @@ -0,0 +1,13 @@ +--TEST-- +DomDocument::CreateEntityReference() - Creates an entity reference with the appropriate name +--CREDITS-- +Clint Priest @ PhpTek09 +--FILE-- +createEntityReference('Test'); + echo $objRef->nodeName; +?> +--EXPECT-- +Test \ No newline at end of file diff --git a/ext/dom/tests/domdocument_createentityreference_002.phpt b/ext/dom/tests/domdocument_createentityreference_002.phpt new file mode 100644 index 0000000000..21d79aa4bb --- /dev/null +++ b/ext/dom/tests/domdocument_createentityreference_002.phpt @@ -0,0 +1,12 @@ +--TEST-- +DomDocument::CreateEntityReference() - Empty Arguments +--CREDITS-- +Clint Priest @ PhpTek09 +--FILE-- +createEntityReference(); +?> +--EXPECTF-- +Warning: DOMDocument::createEntityReference() expects exactly 1 parameter, 0 given in %s \ No newline at end of file diff --git a/ext/gd/tests/imagegammacorrect_variation1.phpt b/ext/gd/tests/imagegammacorrect_variation1.phpt new file mode 100644 index 0000000000..cda96c6287 --- /dev/null +++ b/ext/gd/tests/imagegammacorrect_variation1.phpt @@ -0,0 +1,32 @@ +--TEST-- +Testing imagegammacorrect() of GD library with non TrueColor image +--CREDITS-- +Rafael Dohms +#testfest PHPSP on 2009-06-20 +--SKIPIF-- + +--FILE-- + +--EXPECT-- +7716c0905ae08bd84b4d6cba8969a42e diff --git a/ext/gd/tests/imagerectangle_basic.phpt b/ext/gd/tests/imagerectangle_basic.phpt new file mode 100755 index 0000000000..0574ad35cb --- /dev/null +++ b/ext/gd/tests/imagerectangle_basic.phpt @@ -0,0 +1,27 @@ +--TEST-- +Testing imagerectangle() of GD library +--CREDITS-- +Ivan Rosolen +#testfest PHPSP on 2009-06-30 +--SKIPIF-- + +--FILE-- + +--EXPECT-- +282aaecfdd50091821d63093d9bb1bb9 \ No newline at end of file diff --git a/ext/gd/tests/imagerectangle_error2.phpt b/ext/gd/tests/imagerectangle_error2.phpt new file mode 100755 index 0000000000..c6e740214a --- /dev/null +++ b/ext/gd/tests/imagerectangle_error2.phpt @@ -0,0 +1,19 @@ +--TEST-- +Testing wrong param passing imagerectangle() of GD library +--CREDITS-- +Ivan Rosolen +#testfest PHPSP on 2009-06-30 +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: imagerectangle(): supplied resource is not a valid Image resource in %s on line %d \ No newline at end of file diff --git a/ext/iconv/tests/iconv_get_encoding_basic.phpt b/ext/iconv/tests/iconv_get_encoding_basic.phpt new file mode 100644 index 0000000000..83efd1586d --- /dev/null +++ b/ext/iconv/tests/iconv_get_encoding_basic.phpt @@ -0,0 +1,76 @@ +--TEST-- +iconv_get_encoding() parameter tests +--CREDITS-- +Oystein Rose +#PHPTestFest2009 Norway 2009-06-09 \o/ +--SKIPIF-- + +--FILE-- + +--EXPECT-- +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-8" +array(3) { + ["input_encoding"]=> + string(5) "UTF-8" + ["output_encoding"]=> + string(5) "UTF-8" + ["internal_encoding"]=> + string(5) "UTF-8" +} +bool(false) +array(3) { + ["input_encoding"]=> + string(5) "UTF-8" + ["output_encoding"]=> + string(5) "UTF-8" + ["internal_encoding"]=> + string(5) "UTF-8" +} +string(10) "ISO-8859-1" +string(10) "ISO-8859-1" +string(10) "ISO-8859-1" +array(3) { + ["input_encoding"]=> + string(10) "ISO-8859-1" + ["output_encoding"]=> + string(10) "ISO-8859-1" + ["internal_encoding"]=> + string(10) "ISO-8859-1" +} +bool(false) +array(3) { + ["input_encoding"]=> + string(10) "ISO-8859-1" + ["output_encoding"]=> + string(10) "ISO-8859-1" + ["internal_encoding"]=> + string(10) "ISO-8859-1" +} diff --git a/ext/pcntl/tests/pcntl_fork_basic.phpt b/ext/pcntl/tests/pcntl_fork_basic.phpt new file mode 100644 index 0000000000..82759ba327 --- /dev/null +++ b/ext/pcntl/tests/pcntl_fork_basic.phpt @@ -0,0 +1,27 @@ +--TEST-- +Test function pcntl_fork() by calling it with its expected arguments +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--SKIPIF-- + +--FILE-- + 0) { + pcntl_wait($status); + var_dump($pid); +} else { + var_dump($pid); +} +?> +--EXPECTF-- +*** Test by calling method or function with its expected arguments, first print the child PID and the the father *** +int(0) +int(%d) diff --git a/ext/pcntl/tests/pcntl_fork_variation.phpt b/ext/pcntl/tests/pcntl_fork_variation.phpt new file mode 100644 index 0000000000..4eea07181c --- /dev/null +++ b/ext/pcntl/tests/pcntl_fork_variation.phpt @@ -0,0 +1,48 @@ +--TEST-- +Test function pcntl_fork() by testing the process isolation in the forking hierarchy father -> son -> grandson where father can not knows his grandson +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--SKIPIF-- + +--FILE-- + 0) { + pcntl_wait($status); + echo "father is $pid\n"; + + if (!isset($pid2)) + { + echo "father ($pid) doesn't know its grandsons\n"; + } +} +else +{ + echo "son ($pid)\n"; + $pid2 = pcntl_fork(); + if ($pid2 > 0) + { + pcntl_wait($status2); + echo "son is father of $pid2\n"; + } + else + { + echo "grandson ($pid2)\n"; + } +} +?> +--EXPECTF-- +*** Testing the process isolations between a process and its forks *** +son (0) +grandson (0) +son is father of %d +father is %d +father (%d) doesn't know its grandsons diff --git a/ext/posix/tests/posix_ctermid_basic.phpt b/ext/posix/tests/posix_ctermid_basic.phpt new file mode 100644 index 0000000000..d1d46943ba --- /dev/null +++ b/ext/posix/tests/posix_ctermid_basic.phpt @@ -0,0 +1,18 @@ +--TEST-- +Test function posix_ctermid() by calling it with its expected arguments +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +string(%d) %s diff --git a/ext/posix/tests/posix_errno_basic.phpt b/ext/posix/tests/posix_errno_basic.phpt new file mode 100644 index 0000000000..cd94a97515 --- /dev/null +++ b/ext/posix/tests/posix_errno_basic.phpt @@ -0,0 +1,22 @@ +--TEST-- +Test function posix_errno() by calling it with its expected arguments +--CREDITS-- +Morten Amundsen mor10am@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Test by calling method or function with its expected arguments *** +int(0) diff --git a/ext/posix/tests/posix_errno_variation1.phpt b/ext/posix/tests/posix_errno_variation1.phpt new file mode 100644 index 0000000000..aa9889f7fe --- /dev/null +++ b/ext/posix/tests/posix_errno_variation1.phpt @@ -0,0 +1,22 @@ +--TEST-- +Test function posix_errno() by calling it with with permission error +--CREDITS-- +Morten Amundsen mor10am@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Test by calling function with permission error *** +int(1) diff --git a/ext/posix/tests/posix_errno_variation2.phpt b/ext/posix/tests/posix_errno_variation2.phpt new file mode 100644 index 0000000000..f463d78759 --- /dev/null +++ b/ext/posix/tests/posix_errno_variation2.phpt @@ -0,0 +1,29 @@ +--TEST-- +Test function posix_errno() by calling it with its expected arguments +--CREDITS-- +Morten Amundsen mor10am@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Test by calling function with pid error *** +int(3) diff --git a/ext/posix/tests/posix_geteuid_basic.phpt b/ext/posix/tests/posix_geteuid_basic.phpt new file mode 100644 index 0000000000..76e9028043 --- /dev/null +++ b/ext/posix/tests/posix_geteuid_basic.phpt @@ -0,0 +1,16 @@ +--TEST-- +Test function posix_geteuid() by calling it with its expected arguments +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +int(%d) diff --git a/ext/posix/tests/posix_seteuid_basic.phpt b/ext/posix/tests/posix_seteuid_basic.phpt new file mode 100644 index 0000000000..204ebe8d07 --- /dev/null +++ b/ext/posix/tests/posix_seteuid_basic.phpt @@ -0,0 +1,19 @@ +--TEST-- +Test function posix_seteuid() by calling it with its expected arguments +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +bool(true) diff --git a/ext/posix/tests/posix_seteuid_error.phpt b/ext/posix/tests/posix_seteuid_error.phpt new file mode 100644 index 0000000000..b10e41075e --- /dev/null +++ b/ext/posix/tests/posix_seteuid_error.phpt @@ -0,0 +1,32 @@ +--TEST-- +Test function posix_seteuid() by calling it more than or less than its expected arguments +--SKIPIF-- + +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + +--EXPECTF-- +*** Test by calling method or function with incorrect numbers of arguments *** + +Warning: posix_seteuid() expects exactly 1 parameter, 2 given in %s on line 9 +bool(false) + +Warning: posix_seteuid() expects exactly 1 parameter, 0 given in %s on line 10 +bool(false) diff --git a/ext/posix/tests/posix_seteuid_error2.phpt b/ext/posix/tests/posix_seteuid_error2.phpt new file mode 100644 index 0000000000..808f2d32d1 --- /dev/null +++ b/ext/posix/tests/posix_seteuid_error2.phpt @@ -0,0 +1,55 @@ +--TEST-- +Test function posix_seteuid() by substituting argument 1 with object values. +--SKIPIF-- + +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + new classWithToString(), + 'instance of classWithoutToString' => new classWithoutToString(), + ); + + +foreach ( $variation_array as $var ) { + var_dump(posix_seteuid( $var ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 1 with object values *** +Error: 2 - posix_seteuid() expects parameter 1 to be long, object given, %s +bool(false) +Error: 2 - posix_seteuid() expects parameter 1 to be long, object given, %s +bool(false) diff --git a/ext/posix/tests/posix_seteuid_variation1.phpt b/ext/posix/tests/posix_seteuid_variation1.phpt new file mode 100644 index 0000000000..841bfe0db8 --- /dev/null +++ b/ext/posix/tests/posix_seteuid_variation1.phpt @@ -0,0 +1,41 @@ +--TEST-- +Test function posix_seteuid() by substituting argument 1 with array values. +--SKIPIF-- + +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + 'one', 2 => 'two'); + +$variation_array = array( + 'empty array' => array(), + 'int indexed array' => $index_array, + 'associative array' => $assoc_array, + 'nested arrays' => array('foo', $index_array, $assoc_array), + ); + + +foreach ( $variation_array as $var ) { + var_dump(posix_seteuid( $var ) ); +} + +?> +--EXPECTF-- +Warning: posix_seteuid() expects parameter 1 to be long, array given in %s on line 15 +bool(false) + +Warning: posix_seteuid() expects parameter 1 to be long, array given in %s on line 15 +bool(false) + +Warning: posix_seteuid() expects parameter 1 to be long, array given in %s on line 15 +bool(false) + +Warning: posix_seteuid() expects parameter 1 to be long, array given in %s on line 15 +bool(false) diff --git a/ext/posix/tests/posix_seteuid_variation2.phpt b/ext/posix/tests/posix_seteuid_variation2.phpt new file mode 100644 index 0000000000..2ab7302ce7 --- /dev/null +++ b/ext/posix/tests/posix_seteuid_variation2.phpt @@ -0,0 +1,36 @@ +--TEST-- +Test function posix_seteuid() by substituting argument 1 with boolean values. +--SKIPIF-- + +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + true, + 'lowercase false' =>false, + 'uppercase TRUE' =>TRUE, + 'uppercase FALSE' =>FALSE, + ); + + +foreach ( $variation_array as $var ) { + var_dump(posix_seteuid( $var ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 1 with boolean values *** +bool(false) +bool(false) +bool(false) +bool(false) diff --git a/ext/posix/tests/posix_seteuid_variation4.phpt b/ext/posix/tests/posix_seteuid_variation4.phpt new file mode 100644 index 0000000000..65291417e7 --- /dev/null +++ b/ext/posix/tests/posix_seteuid_variation4.phpt @@ -0,0 +1,40 @@ +--TEST-- +Test function posix_seteuid() by substituting argument 1 with float values. +--SKIPIF-- + +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + $myUid, + 'float -'.$myUid => -$myUid, + 'float 12.3456789000e10' => 12.3456789000e10, + 'float -12.3456789000e10' => -12.3456789000e10, + 'float .5' => .5, + ); + + +foreach ( $variation_array as $var ) { + var_dump(posix_seteuid( $var ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 1 with float values *** +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) diff --git a/ext/posix/tests/posix_seteuid_variation5.phpt b/ext/posix/tests/posix_seteuid_variation5.phpt new file mode 100644 index 0000000000..91d3a72e96 --- /dev/null +++ b/ext/posix/tests/posix_seteuid_variation5.phpt @@ -0,0 +1,34 @@ +--TEST-- +Test function posix_seteuid() by substituting argument 1 with int values. +--SKIPIF-- + +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + 0, + 'int 1' => 1, + 'int -12345' => -12345, + ); + + +foreach ( $variation_array as $var ) { + var_dump(posix_seteuid( $var ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 1 with int values *** +bool(false) +bool(false) +bool(false) diff --git a/ext/posix/tests/posix_setgid_basic.phpt b/ext/posix/tests/posix_setgid_basic.phpt new file mode 100644 index 0000000000..5762d2b13c --- /dev/null +++ b/ext/posix/tests/posix_setgid_basic.phpt @@ -0,0 +1,20 @@ +--TEST-- +Test function posix_setgid() by calling it with its expected arguments +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + +--EXPECTF-- +*** Test by calling method or function with its expected arguments *** +bool(true) diff --git a/ext/posix/tests/posix_setgid_error.phpt b/ext/posix/tests/posix_setgid_error.phpt new file mode 100644 index 0000000000..121b0403c8 --- /dev/null +++ b/ext/posix/tests/posix_setgid_error.phpt @@ -0,0 +1,27 @@ +--TEST-- +Test function posix_setgid() by calling it more than or less than its expected arguments. +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + +--EXPECTF-- +*** Test by calling method or function with incorrect numbers of arguments *** + +Warning: posix_setgid() expects exactly 1 parameter, 2 given in %s on line %d +bool(false) + +Warning: posix_setgid() expects exactly 1 parameter, 0 given in %s on line %d +bool(false) diff --git a/ext/posix/tests/posix_setgid_variation1.phpt b/ext/posix/tests/posix_setgid_variation1.phpt new file mode 100644 index 0000000000..9125327aa9 --- /dev/null +++ b/ext/posix/tests/posix_setgid_variation1.phpt @@ -0,0 +1,41 @@ +--TEST-- +Test function posix_setgid() by substituting argument 1 with array values. +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + 'one', 2 => 'two'); + +$variation_array = array( + 'empty array' => array(), + 'int indexed array' => $index_array, + 'associative array' => $assoc_array, + 'nested arrays' => array('foo', $index_array, $assoc_array), + ); + + +foreach ( $variation_array as $var ) { + var_dump(posix_setgid( $var ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 1 with array values *** + +Warning: posix_setgid() expects parameter 1 to be long, array given in %s on line %d +bool(false) + +Warning: posix_setgid() expects parameter 1 to be long, array given in %s on line %d +bool(false) + +Warning: posix_setgid() expects parameter 1 to be long, array given in %s on line %d +bool(false) + +Warning: posix_setgid() expects parameter 1 to be long, array given in %s on line %d +bool(false) diff --git a/ext/posix/tests/posix_setgid_variation2.phpt b/ext/posix/tests/posix_setgid_variation2.phpt new file mode 100644 index 0000000000..77d614f05c --- /dev/null +++ b/ext/posix/tests/posix_setgid_variation2.phpt @@ -0,0 +1,32 @@ +--TEST-- +Test function posix_setgid() by substituting argument 1 with boolean values. +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + true, + 'lowercase false' =>false, + 'uppercase TRUE' =>TRUE, + 'uppercase FALSE' =>FALSE, + ); + + +foreach ( $variation_array as $var ) { + var_dump(posix_setgid( $var ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 1 with boolean values *** +bool(false) +bool(false) +bool(false) +bool(false) diff --git a/ext/posix/tests/posix_setgid_variation4.phpt b/ext/posix/tests/posix_setgid_variation4.phpt new file mode 100644 index 0000000000..62acf23f39 --- /dev/null +++ b/ext/posix/tests/posix_setgid_variation4.phpt @@ -0,0 +1,34 @@ +--TEST-- +Test function posix_setgid() by substituting argument 1 with float values. +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + 10.5, + 'float -10.5' => -10.5, + 'float 12.3456789000e10' => 12.3456789000e10, + 'float -12.3456789000e10' => -12.3456789000e10, + 'float .5' => .5, + ); + + +foreach ( $variation_array as $var ) { + var_dump(posix_setgid( $var ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 1 with float values *** +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) diff --git a/ext/posix/tests/posix_setgid_variation5.phpt b/ext/posix/tests/posix_setgid_variation5.phpt new file mode 100644 index 0000000000..f7e60a4a84 --- /dev/null +++ b/ext/posix/tests/posix_setgid_variation5.phpt @@ -0,0 +1,30 @@ +--TEST-- +Test function posix_setgid() by substituting argument 1 with int values. +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + 0, + 'long 1' => 1, + 'int -12345' => -2345, + ); + + +foreach ( $variation_array as $var ) { + var_dump(posix_setgid( $var ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 1 with int values *** +bool(false) +bool(false) +bool(false) diff --git a/ext/posix/tests/posix_setgid_variation6.phpt b/ext/posix/tests/posix_setgid_variation6.phpt new file mode 100644 index 0000000000..e1bdfb131a --- /dev/null +++ b/ext/posix/tests/posix_setgid_variation6.phpt @@ -0,0 +1,51 @@ +--TEST-- +Test function posix_setgid() by substituting argument 1 with object values. +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + new classWithToString(), + 'instance of classWithoutToString' => new classWithoutToString(), + ); + + +foreach ( $variation_array as $var ) { + var_dump(posix_setgid( $var ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 1 with object values *** +Error: 2 - posix_setgid() expects parameter 1 to be long, object given, %s +bool(false) +Error: 2 - posix_setgid() expects parameter 1 to be long, object given, %s +bool(false) diff --git a/ext/posix/tests/posix_setuid_basic.phpt b/ext/posix/tests/posix_setuid_basic.phpt new file mode 100644 index 0000000000..986b0be62c --- /dev/null +++ b/ext/posix/tests/posix_setuid_basic.phpt @@ -0,0 +1,19 @@ +--TEST-- +Test function posix_setuid() by calling it with its expected arguments +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +bool(true) diff --git a/ext/posix/tests/posix_setuid_error.phpt b/ext/posix/tests/posix_setuid_error.phpt new file mode 100644 index 0000000000..8aa51586a4 --- /dev/null +++ b/ext/posix/tests/posix_setuid_error.phpt @@ -0,0 +1,35 @@ +--TEST-- +Test function posix_setuid() by calling it more than or less than its expected arguments +--SKIPIF-- + +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + +--EXPECTF-- +*** Test by calling method or function with incorrect numbers of arguments *** + +Warning: posix_setuid() expects exactly 1 parameter, 2 given in %s on line 11 +bool(false) + +Warning: posix_setuid() expects exactly 1 parameter, 0 given in %s on line 13 +bool(false) diff --git a/ext/posix/tests/posix_setuid_error2.phpt b/ext/posix/tests/posix_setuid_error2.phpt new file mode 100644 index 0000000000..6ec0aa9af4 --- /dev/null +++ b/ext/posix/tests/posix_setuid_error2.phpt @@ -0,0 +1,55 @@ +--TEST-- +Test function posix_setuid() by substituting argument 1 with object values. +--SKIPIF-- + +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + new classWithToString(), + 'instance of classWithoutToString' => new classWithoutToString(), + ); + + +foreach ( $variation_array as $var ) { + var_dump(posix_setuid( $var ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 1 with object values *** +Error: 2 - posix_setuid() expects parameter 1 to be long, object given, %s +bool(false) +Error: 2 - posix_setuid() expects parameter 1 to be long, object given, %s +bool(false) diff --git a/ext/posix/tests/posix_setuid_variation1.phpt b/ext/posix/tests/posix_setuid_variation1.phpt new file mode 100644 index 0000000000..bf6d4376cd --- /dev/null +++ b/ext/posix/tests/posix_setuid_variation1.phpt @@ -0,0 +1,41 @@ +--TEST-- +Test function posix_setuid() by substituting argument 1 with array values. +--SKIPIF-- + +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + 'one', 2 => 'two'); + +$variation_array = array( + 'empty array' => array(), + 'int indexed array' => $index_array, + 'associative array' => $assoc_array, + 'nested arrays' => array('foo', $index_array, $assoc_array), + ); + + +foreach ( $variation_array as $var ) { + var_dump(posix_setuid( $var ) ); +} + +?> +--EXPECTF-- +Warning: posix_setuid() expects parameter 1 to be long, array given in %s on line 15 +bool(false) + +Warning: posix_setuid() expects parameter 1 to be long, array given in %s on line 15 +bool(false) + +Warning: posix_setuid() expects parameter 1 to be long, array given in %s on line 15 +bool(false) + +Warning: posix_setuid() expects parameter 1 to be long, array given in %s on line 15 +bool(false) diff --git a/ext/posix/tests/posix_setuid_variation2.phpt b/ext/posix/tests/posix_setuid_variation2.phpt new file mode 100644 index 0000000000..c8ef92827f --- /dev/null +++ b/ext/posix/tests/posix_setuid_variation2.phpt @@ -0,0 +1,36 @@ +--TEST-- +Test function posix_setuid() by substituting argument 1 with boolean values. +--SKIPIF-- + +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + true, + 'lowercase false' =>false, + 'uppercase TRUE' =>TRUE, + 'uppercase FALSE' =>FALSE, + ); + + +foreach ( $variation_array as $var ) { + var_dump(posix_setuid( $var ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 1 with boolean values *** +bool(false) +bool(false) +bool(false) +bool(false) diff --git a/ext/posix/tests/posix_setuid_variation4.phpt b/ext/posix/tests/posix_setuid_variation4.phpt new file mode 100644 index 0000000000..1675964920 --- /dev/null +++ b/ext/posix/tests/posix_setuid_variation4.phpt @@ -0,0 +1,40 @@ +--TEST-- +Test function posix_setuid() by substituting argument 1 with float values. +--SKIPIF-- + +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + $myUid, + 'float -'.$myUid => -$myUid, + 'float 12.3456789000e10' => 12.3456789000e10, + 'float -12.3456789000e10' => -12.3456789000e10, + 'float .5' => .5, + ); + + +foreach ( $variation_array as $var ) { + var_dump(posix_setuid( $var ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 1 with float values *** +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) diff --git a/ext/posix/tests/posix_setuid_variation5.phpt b/ext/posix/tests/posix_setuid_variation5.phpt new file mode 100644 index 0000000000..e1b7c05e0e --- /dev/null +++ b/ext/posix/tests/posix_setuid_variation5.phpt @@ -0,0 +1,34 @@ +--TEST-- +Test function posix_setuid() by substituting argument 1 with int values. +--SKIPIF-- + +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + 0, + 'int 1' => 1, + 'int -12345' => -12345, + ); + + +foreach ( $variation_array as $var ) { + var_dump(posix_setuid( $var ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 1 with int values *** +bool(false) +bool(false) +bool(false) diff --git a/ext/posix/tests/posix_ttyname_error.phpt b/ext/posix/tests/posix_ttyname_error.phpt new file mode 100644 index 0000000000..e3ec695e54 --- /dev/null +++ b/ext/posix/tests/posix_ttyname_error.phpt @@ -0,0 +1,29 @@ +--TEST-- +Test function posix_ttyname() by calling it more than or less than its expected arguments +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + +--EXPECTF-- +*** Test by calling method or function with incorrect numbers of arguments *** + +Warning: posix_ttyname() expects exactly 1 parameter, 2 given in %s on line %d +bool(false) + +Warning: posix_ttyname() expects exactly 1 parameter, 0 given in %s on line %d +bool(false) diff --git a/ext/posix/tests/posix_ttyname_variation1.phpt b/ext/posix/tests/posix_ttyname_variation1.phpt new file mode 100644 index 0000000000..072b9fa672 --- /dev/null +++ b/ext/posix/tests/posix_ttyname_variation1.phpt @@ -0,0 +1,35 @@ +--TEST-- +Test function posix_ttyname() by substituting argument 1 with array values. +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + 'one', 2 => 'two'); + +$variation_array = array( + 'empty array' => array(), + 'int indexed array' => $index_array, + 'associative array' => $assoc_array, + 'nested arrays' => array('foo', $index_array, $assoc_array), + ); + + +foreach ( $variation_array as $var ) { + var_dump(posix_ttyname( $var ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 1 with array values *** +bool(false) +bool(false) +bool(false) +bool(false) diff --git a/ext/posix/tests/posix_ttyname_variation2.phpt b/ext/posix/tests/posix_ttyname_variation2.phpt new file mode 100644 index 0000000000..f46821b0cc --- /dev/null +++ b/ext/posix/tests/posix_ttyname_variation2.phpt @@ -0,0 +1,32 @@ +--TEST-- +Test function posix_ttyname() by substituting argument 1 with boolean values. +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + true, + 'lowercase false' =>false, + 'uppercase TRUE' =>TRUE, + 'uppercase FALSE' =>FALSE, + ); + + +foreach ( $variation_array as $var ) { + var_dump(posix_ttyname( $var ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 1 with boolean values *** +bool(false) +bool(false) +bool(false) +bool(false) diff --git a/ext/posix/tests/posix_ttyname_variation3.phpt b/ext/posix/tests/posix_ttyname_variation3.phpt new file mode 100644 index 0000000000..30054265a0 --- /dev/null +++ b/ext/posix/tests/posix_ttyname_variation3.phpt @@ -0,0 +1,39 @@ +--TEST-- +Test function posix_ttyname() by substituting argument 1 with emptyUnsetUndefNull values. +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + @$unset_var, + 'undefined var' => @$undefined_var, + 'empty string DQ' => "", + 'empty string SQ' => '', + 'uppercase NULL' => NULL, + 'lowercase null' => null, + ); + + +foreach ( $variation_array as $var ) { + var_dump(posix_ttyname( $var ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 1 with emptyUnsetUndefNull values *** +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) diff --git a/ext/posix/tests/posix_ttyname_variation4.phpt b/ext/posix/tests/posix_ttyname_variation4.phpt new file mode 100644 index 0000000000..3215492793 --- /dev/null +++ b/ext/posix/tests/posix_ttyname_variation4.phpt @@ -0,0 +1,34 @@ +--TEST-- +Test function posix_ttyname() by substituting argument 1 with float values. +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + 10.5, + 'float -10.5' => -10.5, + 'float 12.3456789000e10' => 12.3456789000e10, + 'float -12.3456789000e10' => -12.3456789000e10, + 'float .5' => .5, + ); + + +foreach ( $variation_array as $var ) { + var_dump(posix_ttyname( $var ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 1 with float values *** +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) diff --git a/ext/posix/tests/posix_ttyname_variation5.phpt b/ext/posix/tests/posix_ttyname_variation5.phpt new file mode 100644 index 0000000000..661dd606f9 --- /dev/null +++ b/ext/posix/tests/posix_ttyname_variation5.phpt @@ -0,0 +1,28 @@ +--TEST-- +Test function posix_ttyname() by substituting argument 1 with int values. +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + 12345, + 'int -12345' => -2345, + ); + + +foreach ( $variation_array as $var ) { + var_dump(posix_ttyname( $var ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 1 with int values *** +bool(false) +bool(false) diff --git a/ext/posix/tests/posix_ttyname_variation6.phpt b/ext/posix/tests/posix_ttyname_variation6.phpt new file mode 100644 index 0000000000..020aef1156 --- /dev/null +++ b/ext/posix/tests/posix_ttyname_variation6.phpt @@ -0,0 +1,51 @@ +--TEST-- +Test function posix_ttyname() by substituting argument 1 with object values. +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + new classWithToString(), + 'instance of classWithoutToString' => new classWithoutToString(), + ); + + +foreach ( $variation_array as $var ) { + var_dump(posix_ttyname( $var ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 1 with object values *** +Error: 8 - Object of class classWithToString could not be converted to int, %s(%d) +bool(false) +Error: 8 - Object of class classWithoutToString could not be converted to int, %s(%d) +bool(false) diff --git a/ext/posix/tests/posix_ttyname_variation7.phpt b/ext/posix/tests/posix_ttyname_variation7.phpt new file mode 100644 index 0000000000..b39916c5bc --- /dev/null +++ b/ext/posix/tests/posix_ttyname_variation7.phpt @@ -0,0 +1,36 @@ +--TEST-- +Test function posix_ttyname() by substituting argument 1 with string values. +--CREDITS-- +Marco Fabbri mrfabbri@gmail.com +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + "string", + 'string SQ' => 'string', + 'mixed case string' => "sTrInG", + 'heredoc' => $heredoc, + ); + + +foreach ( $variation_array as $var ) { + var_dump(posix_ttyname( $var ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 1 with string values *** +bool(false) +bool(false) +bool(false) +bool(false) diff --git a/ext/reflection/tests/ReflectionClass_CannotClone_basic.phpt b/ext/reflection/tests/ReflectionClass_CannotClone_basic.phpt new file mode 100644 index 0000000000..6b440cfe06 --- /dev/null +++ b/ext/reflection/tests/ReflectionClass_CannotClone_basic.phpt @@ -0,0 +1,15 @@ +--TEST-- +Reflection class can not be cloned +--CREDITS-- +Stefan Koopmanschap +TestFest PHP|Tek +--SKIPIF-- + +--FILE-- + +TestFest PHP|Tek +--SKIPIF-- + +--INI-- +disable_functions=is_file +--FILE-- +isDisabled()); +--EXPECTF-- +bool(true) diff --git a/ext/reflection/tests/bug47254.phpt b/ext/reflection/tests/bug47254.phpt new file mode 100644 index 0000000000..4bcce1bb72 --- /dev/null +++ b/ext/reflection/tests/bug47254.phpt @@ -0,0 +1,42 @@ +--TEST-- +Bug #47254 +--CREDITS-- +Sebastian Schürmann +sebs@php.net +Testfest 2009 Munich +--FILE-- +getMethods(); +print_r($m); + +?> +--CLEAN-- +--EXPECT-- +Array +( + [0] => ReflectionMethod Object + ( + [name] => b + [class] => B + ) + + [1] => ReflectionMethod Object + ( + [name] => a + [class] => A + ) + +) diff --git a/ext/simplexml/tests/SimpleXMLElement_addAttribute_required_attribute_name.phpt b/ext/simplexml/tests/SimpleXMLElement_addAttribute_required_attribute_name.phpt new file mode 100644 index 0000000000..22ea4488e6 --- /dev/null +++ b/ext/simplexml/tests/SimpleXMLElement_addAttribute_required_attribute_name.phpt @@ -0,0 +1,18 @@ +--TEST-- +SimpleXMLElement: Test to ensure that the required attribute name correctly is giving a warning +--CREDITS-- +Havard Eide +#PHPTestFest2009 Norway 2009-06-09 \o/ +--SKIPIF-- + +--FILE-- +testfest"); +$a->addAttribute( "", "" ); +echo $a->asXML(); +?> +--EXPECTF-- +Warning: SimpleXMLElement::addAttribute(): Attribute name is required in %s on line %d + +testfest + diff --git a/ext/sockets/tests/socket_bind.phpt b/ext/sockets/tests/socket_bind.phpt new file mode 100644 index 0000000000..15181e68a6 --- /dev/null +++ b/ext/sockets/tests/socket_bind.phpt @@ -0,0 +1,38 @@ +--TEST-- +ext/sockets - socket_bind - basic test +--CREDITS-- +Florian Anderiasch +fa@php.net +--SKIPIF-- + +--FILE-- + + +--EXPECTF-- +bool(true) +bool(true) +int(16) +NULL + diff --git a/ext/sockets/tests/socket_bind_params.phpt b/ext/sockets/tests/socket_bind_params.phpt new file mode 100644 index 0000000000..d68a62a474 --- /dev/null +++ b/ext/sockets/tests/socket_bind_params.phpt @@ -0,0 +1,29 @@ +--TEST-- +ext/sockets - socket_bind - test with empty parameters +--CREDITS-- +Florian Anderiasch +fa@php.net +--SKIPIF-- + +--FILE-- + +--EXPECTF-- + +Warning: socket_bind() expects at least 2 parameters, 0 given in %s on line %i +NULL + +Warning: socket_bind() expects at least 2 parameters, 1 given in %s on line %i +NULL diff --git a/ext/sockets/tests/socket_close_params.phpt b/ext/sockets/tests/socket_close_params.phpt new file mode 100644 index 0000000000..a00330f5e5 --- /dev/null +++ b/ext/sockets/tests/socket_close_params.phpt @@ -0,0 +1,21 @@ +--TEST-- +ext/sockets - socket_close - test with empty parameters +--CREDITS-- +Florian Anderiasch +fa@php.net +--SKIPIF-- + +--FILE-- + +--EXPECTF-- + +Warning: socket_close() expects exactly 1 parameter, 0 given in %s on line %i +NULL diff --git a/ext/sockets/tests/socket_connect_error.phpt b/ext/sockets/tests/socket_connect_error.phpt new file mode 100644 index 0000000000..33e60f3d54 --- /dev/null +++ b/ext/sockets/tests/socket_connect_error.phpt @@ -0,0 +1,33 @@ +--TEST-- +Test error cases when creating a socket +--CREDITS-- +Russell Flynn +#PHPTestFest2009 Norway 2009-06-09 \o/ +--INI-- +error_reporting=E_ALL +display_errors=1 +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: socket_create() expects exactly 3 parameters, 0 given in %s on line %d + +Warning: socket_create() expects exactly 3 parameters, 2 given in %s on line %d + +Warning: socket_create() expects parameter 1 to be long, array given in %s on line %d + diff --git a/ext/sockets/tests/socket_connect_params.phpt b/ext/sockets/tests/socket_connect_params.phpt new file mode 100644 index 0000000000..c8dff06e8e --- /dev/null +++ b/ext/sockets/tests/socket_connect_params.phpt @@ -0,0 +1,33 @@ +--TEST-- +ext/sockets - socket_connect - test with empty parameters +--CREDITS-- +Florian Anderiasch +fa@php.net +--SKIPIF-- + +--FILE-- + +--EXPECTF-- + +Warning: socket_connect() expects at least 2 parameters, 0 given in %s on line %i + +Warning: socket_connect() expects at least 2 parameters, 1 given in %s on line %i + +Warning: socket_connect(): Socket of type AF_INET requires 3 arguments in %s on line %i + +Warning: socket_connect(): unable to connect [%i]: Transport endpoint is already connected in %s on line %i diff --git a/ext/sockets/tests/socket_create_listen_params.phpt b/ext/sockets/tests/socket_create_listen_params.phpt new file mode 100644 index 0000000000..56a9c8de23 --- /dev/null +++ b/ext/sockets/tests/socket_create_listen_params.phpt @@ -0,0 +1,23 @@ +--TEST-- +ext/sockets - socket_create_listen - test for empty parameters +--CREDITS-- +Florian Anderiasch +fa@php.net +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: socket_create_listen() expects at least 1 parameter, 0 given in %s on line %i +NULL diff --git a/ext/sockets/tests/socket_create_listen_used.phpt b/ext/sockets/tests/socket_create_listen_used.phpt new file mode 100644 index 0000000000..d89f1b70e8 --- /dev/null +++ b/ext/sockets/tests/socket_create_listen_used.phpt @@ -0,0 +1,30 @@ +--TEST-- +ext/sockets - socket_create_listen - test for used socket +--CREDITS-- +Florian Anderiasch +fa@php.net +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +resource(%i) of type (Socket) + +Warning: socket_create_listen(): unable to bind to given address [%i]: Address already in use in %s on line %i +bool(false) + +Warning: socket_close() expects parameter 1 to be resource, boolean given in %s on line %i diff --git a/ext/sockets/tests/socket_create_params.phpt b/ext/sockets/tests/socket_create_params.phpt new file mode 100644 index 0000000000..13a1c73eee --- /dev/null +++ b/ext/sockets/tests/socket_create_params.phpt @@ -0,0 +1,24 @@ +--TEST-- +ext/sockets - socket_create - test with empty parameters +--CREDITS-- +Florian Anderiasch +fa@php.net +--SKIPIF-- + +--FILE-- + +--EXPECTF-- + +Warning: socket_create() expects exactly 3 parameters, 0 given in %s on line %i + +Warning: socket_create() expects exactly 3 parameters, 1 given in %s on line %i + +Warning: socket_create() expects exactly 3 parameters, 2 given in %s on line %i diff --git a/ext/sockets/tests/socket_getpeername.phpt b/ext/sockets/tests/socket_getpeername.phpt new file mode 100644 index 0000000000..2252992c02 --- /dev/null +++ b/ext/sockets/tests/socket_getpeername.phpt @@ -0,0 +1,33 @@ +--TEST-- +ext/sockets - socket_getsockname - basic test +--CREDITS-- +Florian Anderiasch +fa@php.net +--SKIPIF-- + +--FILE-- + + +--EXPECTF-- +bool(true) + +Warning: socket_getpeername(): unable to retrieve peer name [%i]: Transport endpoint is not connected in %s on line %i +bool(false) +NULL +NULL diff --git a/ext/sockets/tests/socket_getpeername_ipv4loop.phpt b/ext/sockets/tests/socket_getpeername_ipv4loop.phpt new file mode 100644 index 0000000000..aa59abb8da --- /dev/null +++ b/ext/sockets/tests/socket_getpeername_ipv4loop.phpt @@ -0,0 +1,59 @@ +--TEST-- +ext/sockets - socket_getpeername_ipv4loop - basic test +--CREDITS-- +# TestFest 2009 - NorwayUG +# $Id: socket_getpeername_ipv4loop.phpt 494 2009-06-09 20:38:05Z tatjana.andersen@redpill-linpro.com $ +--SKIPIF-- + +--FILE-- + +--EXPECT-- +string(9) "127.0.0.1" +int(31337) diff --git a/ext/sockets/tests/socket_getsockname.phpt b/ext/sockets/tests/socket_getsockname.phpt new file mode 100644 index 0000000000..877bef5016 --- /dev/null +++ b/ext/sockets/tests/socket_getsockname.phpt @@ -0,0 +1,32 @@ +--TEST-- +ext/sockets - socket_getsockname - basic test +--CREDITS-- +Florian Anderiasch +fa@php.net +--SKIPIF-- + +--FILE-- + + +--EXPECTF-- +bool(true) +bool(true) +string(7) "0.0.0.0" +int(%i) + diff --git a/ext/sockets/tests/socket_listen_params.phpt b/ext/sockets/tests/socket_listen_params.phpt new file mode 100644 index 0000000000..65c11170fe --- /dev/null +++ b/ext/sockets/tests/socket_listen_params.phpt @@ -0,0 +1,21 @@ +--TEST-- +ext/sockets - socket_listen - test with empty parameters +--CREDITS-- +Florian Anderiasch +fa@php.net +--SKIPIF-- + +--FILE-- + +--EXPECTF-- + +Warning: socket_listen() expects at least 1 parameter, 0 given in %s on line %i +NULL diff --git a/ext/sockets/tests/socket_read_params.phpt b/ext/sockets/tests/socket_read_params.phpt new file mode 100644 index 0000000000..69af710ca6 --- /dev/null +++ b/ext/sockets/tests/socket_read_params.phpt @@ -0,0 +1,28 @@ +--TEST-- +ext/sockets - socket_read- test with empty parameters +--CREDITS-- +Florian Anderiasch +fa@php.net +--SKIPIF-- + +--FILE-- + +--EXPECTF-- + +Warning: socket_read() expects at least 2 parameters, 0 given in %s on line %i + +Warning: socket_read() expects at least 2 parameters, 1 given in %s on line %i + +Warning: socket_read(): unable to read from socket [%i]: Transport endpoint is not connected in %s on line %i diff --git a/ext/sockets/tests/socket_set_nonblock.phpt b/ext/sockets/tests/socket_set_nonblock.phpt new file mode 100644 index 0000000000..55137d3582 --- /dev/null +++ b/ext/sockets/tests/socket_set_nonblock.phpt @@ -0,0 +1,24 @@ +--TEST-- +ext/sockets - socket_set_block - basic test +--CREDITS-- +Florian Anderiasch +fa@php.net +--SKIPIF-- + +--FILE-- + + +--EXPECTF-- +resource(%i) of type (Socket) + diff --git a/ext/sockets/tests/socket_write_params.phpt b/ext/sockets/tests/socket_write_params.phpt new file mode 100644 index 0000000000..e23766ea62 --- /dev/null +++ b/ext/sockets/tests/socket_write_params.phpt @@ -0,0 +1,28 @@ +--TEST-- +ext/sockets - socket_write - test with empty parameters +--CREDITS-- +Florian Anderiasch +fa@php.net +--SKIPIF-- + +--FILE-- + +--EXPECTF-- + +Warning: socket_write() expects at least 2 parameters, 0 given in %s on line %i + +Warning: socket_write() expects at least 2 parameters, 1 given in %s on line %i + +Warning: socket_write(): unable to write to socket [%i]: Broken pipe in %s on line %i diff --git a/ext/spl/tests/DirectoryIterator_by_reference.phpt b/ext/spl/tests/DirectoryIterator_by_reference.phpt new file mode 100644 index 0000000000..5352a5df18 --- /dev/null +++ b/ext/spl/tests/DirectoryIterator_by_reference.phpt @@ -0,0 +1,14 @@ +--TEST-- +DirectoryIterator: test that you cannot use iterator with reference +--CREDITS-- +Havard Eide +#PHPTestFest2009 Norway 2009-06-09 \o/ +--FILE-- + +--EXPECTF-- +Fatal error: An iterator cannot be used with foreach by reference in %s on line %d \ No newline at end of file diff --git a/ext/spl/tests/DirectoryIterator_empty_constructor.phpt b/ext/spl/tests/DirectoryIterator_empty_constructor.phpt new file mode 100644 index 0000000000..da5276ccdc --- /dev/null +++ b/ext/spl/tests/DirectoryIterator_empty_constructor.phpt @@ -0,0 +1,15 @@ +--TEST-- +DirectoryIterator: Test empty value to DirectoryIterator constructor +--CREDITS-- +Havard Eide +#PHPTestFest2009 Norway 2009-06-09 \o/ +--FILE-- + +--EXPECTF-- +Fatal error: Uncaught exception 'RuntimeException' with message 'Directory name must not be empty.' in %s:%d +Stack trace: +#0 %s(%d): DirectoryIterator->__construct('') +#1 {main} + thrown in %s on line %d \ No newline at end of file diff --git a/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt b/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt new file mode 100644 index 0000000000..58387cccef --- /dev/null +++ b/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt @@ -0,0 +1,30 @@ +--TEST-- +SPL: DirectoryIterator test getGroup +--CREDITS-- +Cesare D'Amico +Andrea Giorgini +Filippo De Santis +Daniel Londero +Francesco Trucchia +Jacopo Romei +#Test Fest Cesena (Italy) on 2009-06-20 +--SKIPIF-- + +--FILE-- +getGroup() == $result); + +?> +--CLEAN-- + +--EXPECTF-- +bool(true) diff --git a/ext/spl/tests/DirectoryIterator_getInode_error.phpt b/ext/spl/tests/DirectoryIterator_getInode_error.phpt new file mode 100644 index 0000000000..c3641f9d89 --- /dev/null +++ b/ext/spl/tests/DirectoryIterator_getInode_error.phpt @@ -0,0 +1,28 @@ +--TEST-- +SPL: Spl File Info test getInode +--CREDITS-- +Cesare D'Amico +Andrea Giorgini +Filippo De Santis +Daniel Londero +Francesco Trucchia +Jacopo Romei +#Test Fest Cesena (Italy) on 2009-06-20 +--SKIPIF-- + +--FILE-- +getInode()); +?> + +--EXPECTF-- +Fatal error: Uncaught exception 'RuntimeException' with message 'SplFileInfo::getInode(): stat failed for %s' in %s +Stack trace: +#0 %s: SplFileInfo->getInode() +#1 {main} + thrown in %s diff --git a/ext/spl/tests/DirectoryIterator_getOwner_basic.phpt b/ext/spl/tests/DirectoryIterator_getOwner_basic.phpt new file mode 100644 index 0000000000..e342dcdb6f --- /dev/null +++ b/ext/spl/tests/DirectoryIterator_getOwner_basic.phpt @@ -0,0 +1,29 @@ +--TEST-- +SPL: Spl Directory Iterator test getOwner +--CREDITS-- +Cesare D'Amico +Andrea Giorgini +Filippo De Santis +Daniel Londero +Francesco Trucchia +Jacopo Romei +#Test Fest Cesena (Italy) on 2009-06-20 +--SKIPIF-- + +--FILE-- +getOwner() == $result); + +?> +--CLEAN-- + +--EXPECTF-- +bool(true) diff --git a/ext/spl/tests/SplFileInfo_getGroup_basic.phpt b/ext/spl/tests/SplFileInfo_getGroup_basic.phpt new file mode 100644 index 0000000000..7b0528d7d1 --- /dev/null +++ b/ext/spl/tests/SplFileInfo_getGroup_basic.phpt @@ -0,0 +1,30 @@ +--TEST-- +SPL: Spl File Info test getGroup +--CREDITS-- +Cesare D'Amico +Andrea Giorgini +Filippo De Santis +Daniel Londero +Francesco Trucchia +Jacopo Romei +#Test Fest Cesena (Italy) on 2009-06-20 +--SKIPIF-- + +--FILE-- +getGroup() == $result); + +?> +--CLEAN-- + +--EXPECTF-- +bool(true) diff --git a/ext/spl/tests/SplFileInfo_getGroup_error.phpt b/ext/spl/tests/SplFileInfo_getGroup_error.phpt new file mode 100644 index 0000000000..f0db00d9ed --- /dev/null +++ b/ext/spl/tests/SplFileInfo_getGroup_error.phpt @@ -0,0 +1,28 @@ +--TEST-- +SPL: Spl File Info test getGroup +--CREDITS-- +Cesare D'Amico +Andrea Giorgini +Filippo De Santis +Daniel Londero +Francesco Trucchia +Jacopo Romei +#Test Fest Cesena (Italy) on 2009-06-20 +--SKIPIF-- + +--FILE-- +getGroup()); +?> + +--EXPECTF-- +Fatal error: Uncaught exception 'RuntimeException' with message 'SplFileInfo::getGroup(): stat failed for not_existing' in %s +Stack trace: +#0 %s: SplFileInfo->getGroup() +#1 {main} + thrown in %s on line %d diff --git a/ext/spl/tests/SplFileInfo_getInode_basic.phpt b/ext/spl/tests/SplFileInfo_getInode_basic.phpt new file mode 100644 index 0000000000..902cbb31c6 --- /dev/null +++ b/ext/spl/tests/SplFileInfo_getInode_basic.phpt @@ -0,0 +1,30 @@ +--TEST-- +SPL: Spl File Info test getInode +--CREDITS-- +Cesare D'Amico +Andrea Giorgini +Filippo De Santis +Daniel Londero +Francesco Trucchia +Jacopo Romei +#Test Fest Cesena (Italy) on 2009-06-20 +--SKIPIF-- + +--FILE-- +getInode() == $result); + +?> +--CLEAN-- + +--EXPECTF-- +bool(true) diff --git a/ext/spl/tests/SplFileInfo_getInode_error.phpt b/ext/spl/tests/SplFileInfo_getInode_error.phpt new file mode 100644 index 0000000000..bf8efae4c9 --- /dev/null +++ b/ext/spl/tests/SplFileInfo_getInode_error.phpt @@ -0,0 +1,28 @@ +--TEST-- +SPL: Spl File Info test getPerms +--CREDITS-- +Cesare D'Amico +Andrea Giorgini +Filippo De Santis +Daniel Londero +Francesco Trucchia +Jacopo Romei +#Test Fest Cesena (Italy) on 2009-06-20 +--SKIPIF-- + +--FILE-- +getInode()); +?> + +--EXPECTF-- +Fatal error: Uncaught exception 'RuntimeException' with message 'SplFileInfo::getInode(): stat failed for not_existing' in %s +Stack trace: +#0 %s: SplFileInfo->getInode() +#1 {main} + thrown in %s on line %d diff --git a/ext/spl/tests/SplFileInfo_getOwner_basic.phpt b/ext/spl/tests/SplFileInfo_getOwner_basic.phpt new file mode 100644 index 0000000000..50f79430c9 --- /dev/null +++ b/ext/spl/tests/SplFileInfo_getOwner_basic.phpt @@ -0,0 +1,30 @@ +--TEST-- +SPL: Spl File Info test getOwner +--CREDITS-- +Cesare D'Amico +Andrea Giorgini +Filippo De Santis +Daniel Londero +Francesco Trucchia +Jacopo Romei +#Test Fest Cesena (Italy) on 2009-06-20 +--SKIPIF-- + +--FILE-- +getOwner() == $result); + +?> +--CLEAN-- + +--EXPECTF-- +bool(true) diff --git a/ext/spl/tests/SplFileInfo_getOwner_error.phpt b/ext/spl/tests/SplFileInfo_getOwner_error.phpt new file mode 100644 index 0000000000..d5d46781cc --- /dev/null +++ b/ext/spl/tests/SplFileInfo_getOwner_error.phpt @@ -0,0 +1,28 @@ +--TEST-- +SPL: Spl File Info test getOwner +--CREDITS-- +Cesare D'Amico +Andrea Giorgini +Filippo De Santis +Daniel Londero +Francesco Trucchia +Jacopo Romei +#Test Fest Cesena (Italy) on 2009-06-20 +--SKIPIF-- + +--FILE-- +getOwner()); +?> + +--EXPECTF-- +Fatal error: Uncaught exception 'RuntimeException' with message 'SplFileInfo::getOwner(): stat failed for not_existing' in %s +Stack trace: +#0 %s: SplFileInfo->getOwner() +#1 {main} + thrown in %s on line %d diff --git a/ext/spl/tests/SplFileInfo_getPerms_basic.phpt b/ext/spl/tests/SplFileInfo_getPerms_basic.phpt new file mode 100644 index 0000000000..e9b7beaa97 --- /dev/null +++ b/ext/spl/tests/SplFileInfo_getPerms_basic.phpt @@ -0,0 +1,30 @@ +--TEST-- +SPL: Spl File Info test getPerms +--CREDITS-- +Cesare D'Amico +Andrea Giorgini +Filippo De Santis +Daniel Londero +Francesco Trucchia +Jacopo Romei +#Test Fest Cesena (Italy) on 2009-06-20 +--SKIPIF-- + +--FILE-- +getPerms() == 0100557); + +?> +--CLEAN-- + +--EXPECTF-- +bool(true) diff --git a/ext/spl/tests/SplFileInfo_getPerms_error.phpt b/ext/spl/tests/SplFileInfo_getPerms_error.phpt new file mode 100644 index 0000000000..8e05cdf8df --- /dev/null +++ b/ext/spl/tests/SplFileInfo_getPerms_error.phpt @@ -0,0 +1,28 @@ +--TEST-- +SPL: Spl File Info test getPerms +--CREDITS-- +Cesare D'Amico +Andrea Giorgini +Filippo De Santis +Daniel Londero +Francesco Trucchia +Jacopo Romei +#Test Fest Cesena (Italy) on 2009-06-20 +--SKIPIF-- + +--FILE-- +getPerms() == 0100557); +?> + +--EXPECTF-- +Fatal error: Uncaught exception 'RuntimeException' with message 'SplFileInfo::getPerms(): stat failed for %s' in %s +Stack trace: +#0 %s: SplFileInfo->getPerms() +#1 {main} + thrown in %s diff --git a/ext/standard/tests/array/key_exists_basic.phpt b/ext/standard/tests/array/key_exists_basic.phpt new file mode 100644 index 0000000000..40d982da21 --- /dev/null +++ b/ext/standard/tests/array/key_exists_basic.phpt @@ -0,0 +1,15 @@ +--TEST-- +Test function key_exists() by calling it with its expected arguments +--CREDITS-- +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + 1); +var_dump(key_exists('bar', $a)); +var_dump(key_exists('foo', $a)); +--EXPECTF-- +*** test key_exists() by calling it with its expected arguments *** +bool(true) +bool(false) diff --git a/ext/standard/tests/array/key_exists_variation1.phpt b/ext/standard/tests/array/key_exists_variation1.phpt new file mode 100644 index 0000000000..94ea8d45f7 --- /dev/null +++ b/ext/standard/tests/array/key_exists_variation1.phpt @@ -0,0 +1,15 @@ +--TEST-- +Test function key_exists() by calling it with its expected arguments +--CREDITS-- +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + 1, 'foo' => array('bar' => 2, 'baz' => 3)); +var_dump(key_exists('baz', $a)); +var_dump(key_exists('baz', $a['foo'])); +--EXPECTF-- +*** test key_exists() by calling it with its expected arguments *** +bool(false) +bool(true) diff --git a/ext/standard/tests/array/key_exists_variation2.phpt b/ext/standard/tests/array/key_exists_variation2.phpt new file mode 100644 index 0000000000..5f5ab86a4f --- /dev/null +++ b/ext/standard/tests/array/key_exists_variation2.phpt @@ -0,0 +1,72 @@ +--TEST-- +Test function key_exists() by calling it with its expected arguments +--CREDITS-- +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + 'bar', 'foo' => 'baz'); +var_dump(key_exists(0, $a)); + +echo "integer\n"; +// 1 has index = 0 +$b = array(1, 'foo' => 'baz'); +var_dump(key_exists(0, $b)); + +// 42 has index = 0, netherless its position is the latest +$c = array('foo' => 'baz', 42); +var_dump(key_exists(0, $c)); + +echo "string\n"; +// 'bar' has index = 0, netherless it is a string +$d = array('bar', 'foo' => 'baz'); +var_dump(key_exists(0, $d)); + +// 'baz' has index = 0, netherless its position is the latest +$e = array('foo' => 'baz', 'baz'); +var_dump(key_exists(0, $e)); + +echo "obj\n"; +class ObjectA +{ + public $foo = 'bar'; +} + +$obj = new ObjectA(); + +// object has index = 0, netherless its position is the latest +$f = array('foo' => 'baz', $obj); +var_dump(key_exists(0, $f)); + +// object has index = 0, netherless its position is the first +$g = array($obj, 'foo' => 'baz'); +var_dump(key_exists(0, $g)); + +echo "stream resource\n"; +// stream resource has index = 0, netherless its position is the first +$st = fopen('php://memory', '+r'); +$h = array($st, 'foo' => 'baz'); +var_dump(key_exists(0, $h)); + +// stream resource has index = 0, netherless its position is the latest +$i = array('foo' => 'baz', $st); +var_dump(key_exists(0, $i)); + +--EXPECTF-- +*** test key_exists() by using mixed type of arrays *** +bool(false) +integer +bool(true) +bool(true) +string +bool(true) +bool(true) +obj +bool(true) +bool(true) +stream resource +bool(true) +bool(true) diff --git a/ext/standard/tests/file/file_get_contents_error001.phpt b/ext/standard/tests/file/file_get_contents_error001.phpt new file mode 100644 index 0000000000..ced0da032c --- /dev/null +++ b/ext/standard/tests/file/file_get_contents_error001.phpt @@ -0,0 +1,18 @@ +--TEST-- +file_get_contents() test using offset parameter out of range +--CREDITS-- +"Blanche V.N." +"Sylvain R." +--INI-- +display_errors=false +--SKIPIF-- + +--FILE-- + +--EXPECT-- +bool(false) diff --git a/ext/standard/tests/file/file_get_contents_error002.phpt b/ext/standard/tests/file/file_get_contents_error002.phpt new file mode 100644 index 0000000000..47c7b9cd63 --- /dev/null +++ b/ext/standard/tests/file/file_get_contents_error002.phpt @@ -0,0 +1,18 @@ +--TEST-- +file_get_contents() test using negative parameter for length (last parameter) +--CREDITS-- +"Blanche V.N." +"Sylvain R." +--INI-- +display_errors=false +--SKIPIF-- + +--FILE-- + +--EXPECT-- +bool(false) diff --git a/ext/standard/tests/general_functions/get_cfg_var_variation2.phpt b/ext/standard/tests/general_functions/get_cfg_var_variation2.phpt new file mode 100644 index 0000000000..68495a13d9 --- /dev/null +++ b/ext/standard/tests/general_functions/get_cfg_var_variation2.phpt @@ -0,0 +1,35 @@ +--TEST-- +Test function get_cfg_var() by substituting argument 1 with boolean 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-- + true, + 'lowercase false' =>false, + 'uppercase TRUE' =>TRUE, + 'uppercase FALSE' =>FALSE, + ); + + +foreach ( $variation_array as $var ) { + var_dump(get_cfg_var( $var ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 1 with boolean values *** +bool(false) +bool(false) +bool(false) +bool(false) diff --git a/ext/standard/tests/general_functions/get_cfg_var_variation3.phpt b/ext/standard/tests/general_functions/get_cfg_var_variation3.phpt new file mode 100644 index 0000000000..d1fb5e7dda --- /dev/null +++ b/ext/standard/tests/general_functions/get_cfg_var_variation3.phpt @@ -0,0 +1,42 @@ +--TEST-- +Test function get_cfg_var() by substituting argument 1 with emptyUnsetUndefNull 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-- + @$unset_var, + 'undefined var' => @$undefined_var, + 'empty string DQ' => "", + 'empty string SQ' => '', + 'uppercase NULL' => NULL, + 'lowercase null' => null + ); + + +foreach ( $variation_array as $var ) { + var_dump(get_cfg_var( $var ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 1 with emptyUnsetUndefNull values *** +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) diff --git a/ext/standard/tests/general_functions/get_cfg_var_variation4.phpt b/ext/standard/tests/general_functions/get_cfg_var_variation4.phpt new file mode 100644 index 0000000000..8dac4f8a40 --- /dev/null +++ b/ext/standard/tests/general_functions/get_cfg_var_variation4.phpt @@ -0,0 +1,37 @@ +--TEST-- +Test function get_cfg_var() by substituting argument 1 with float 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-- + 10.5, + 'float -10.5' => -10.5, + 'float 12.3456789000e10' => 12.3456789000e10, + 'float -12.3456789000e10' => -12.3456789000e10, + 'float .5' => .5, + ); + + +foreach ( $variation_array as $var ) { + var_dump(get_cfg_var( $var ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 1 with float values *** +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) diff --git a/ext/standard/tests/general_functions/get_cfg_var_variation5.phpt b/ext/standard/tests/general_functions/get_cfg_var_variation5.phpt new file mode 100644 index 0000000000..392abb32c5 --- /dev/null +++ b/ext/standard/tests/general_functions/get_cfg_var_variation5.phpt @@ -0,0 +1,35 @@ +--TEST-- +Test function get_cfg_var() by substituting argument 1 with int 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-- + 0, + 'int 1' => 1, + 'int 12345' => 12345, + 'int -12345' => -2345, + ); + + +foreach ( $variation_array as $var ) { + var_dump(get_cfg_var( $var ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 1 with int values *** +bool(false) +bool(false) +bool(false) +bool(false) diff --git a/ext/standard/tests/general_functions/get_cfg_var_variation7.phpt b/ext/standard/tests/general_functions/get_cfg_var_variation7.phpt new file mode 100644 index 0000000000..3b5b08c6d5 --- /dev/null +++ b/ext/standard/tests/general_functions/get_cfg_var_variation7.phpt @@ -0,0 +1,39 @@ +--TEST-- +Test function get_cfg_var() by substituting argument 1 with string 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-- + "string", + 'string SQ' => 'string', + 'mixed case string' => "sTrInG", + 'heredoc' => $heredoc + ); + + +foreach ( $variation_array as $var ) { + var_dump(get_cfg_var( $var ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 1 with unknown string values *** +bool(false) +bool(false) +bool(false) +bool(false) diff --git a/ext/standard/tests/general_functions/getservbyname_basic.phpt b/ext/standard/tests/general_functions/getservbyname_basic.phpt new file mode 100755 index 0000000000..164e71afd4 --- /dev/null +++ b/ext/standard/tests/general_functions/getservbyname_basic.phpt @@ -0,0 +1,31 @@ +--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-- + +--EXPECTF-- +int(%d) +int(%d) +int(%d) +int(%d) +int(%d) +int(%d) +int(%d) +int(%d) +int(%d) +int(%d) +int(%d) diff --git a/ext/standard/tests/general_functions/getservbyname_variation10.phpt b/ext/standard/tests/general_functions/getservbyname_variation10.phpt new file mode 100755 index 0000000000..70aa567646 --- /dev/null +++ b/ext/standard/tests/general_functions/getservbyname_variation10.phpt @@ -0,0 +1,36 @@ +--TEST-- +Test function getservbyname() by substituting argument 2 with emptyUnsetUndefNull values. +--FILE-- + @$unset_var, + 'undefined var' => @$undefined_var, + 'empty string DQ' => "", + 'empty string SQ' => '', + 'uppercase NULL' => NULL, + 'lowercase null' => null, + ); + + +foreach ( $variation_array as $var ) { + var_dump(getservbyname( $service, $var ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 2 with emptyUnsetUndefNull values *** +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) diff --git a/ext/standard/tests/general_functions/getservbyname_variation11.phpt b/ext/standard/tests/general_functions/getservbyname_variation11.phpt new file mode 100755 index 0000000000..3c410c55b6 --- /dev/null +++ b/ext/standard/tests/general_functions/getservbyname_variation11.phpt @@ -0,0 +1,30 @@ +--TEST-- +Test function getservbyname() by substituting argument 2 with float values. +--FILE-- + 10.5, + 'float -10.5' => -10.5, + 'float 12.3456789000e10' => 12.3456789000e10, + 'float -12.3456789000e10' => -12.3456789000e10, + 'float .5' => .5, + ); + + +foreach ( $variation_array as $var ) { + var_dump(getservbyname( $service, $var ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 2 with float values *** +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) diff --git a/ext/standard/tests/general_functions/getservbyname_variation12.phpt b/ext/standard/tests/general_functions/getservbyname_variation12.phpt new file mode 100755 index 0000000000..7e5323cca8 --- /dev/null +++ b/ext/standard/tests/general_functions/getservbyname_variation12.phpt @@ -0,0 +1,29 @@ +--TEST-- +Test function getservbyname() by substituting argument 2 with int values. +--FILE-- + 0, + 'int 1' => 1, + 'int 12345' => 12345, + 'int -12345' => -2345, + ); + + +foreach ( $variation_array as $var ) { + var_dump(getservbyname( $service, $var ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 2 with int values *** +bool(false) +bool(false) +bool(false) +bool(false) diff --git a/ext/standard/tests/general_functions/getservbyname_variation14.phpt b/ext/standard/tests/general_functions/getservbyname_variation14.phpt new file mode 100755 index 0000000000..d93b53ece4 --- /dev/null +++ b/ext/standard/tests/general_functions/getservbyname_variation14.phpt @@ -0,0 +1,33 @@ +--TEST-- +Test function getservbyname() by substituting argument 2 with string values. +--FILE-- + "string", + 'string SQ' => 'string', + 'mixed case string' => "sTrInG", + 'heredoc' => $heredoc, + ); + + +foreach ( $variation_array as $var ) { + var_dump(getservbyname( $service, $var ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 2 with string values *** +bool(false) +bool(false) +bool(false) +bool(false) diff --git a/ext/standard/tests/general_functions/getservbyname_variation2.phpt b/ext/standard/tests/general_functions/getservbyname_variation2.phpt new file mode 100755 index 0000000000..877c1d12af --- /dev/null +++ b/ext/standard/tests/general_functions/getservbyname_variation2.phpt @@ -0,0 +1,29 @@ +--TEST-- +Test function getservbyname() by substituting argument 1 with boolean values. +--FILE-- + true, + 'lowercase false' =>false, + 'uppercase TRUE' =>TRUE, + 'uppercase FALSE' =>FALSE, + ); + + +foreach ( $variation_array as $var ) { + var_dump(getservbyname( $var , $protocol ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 1 with boolean values *** +bool(false) +bool(false) +bool(false) +bool(false) diff --git a/ext/standard/tests/general_functions/getservbyname_variation3.phpt b/ext/standard/tests/general_functions/getservbyname_variation3.phpt new file mode 100755 index 0000000000..d34259d2a2 --- /dev/null +++ b/ext/standard/tests/general_functions/getservbyname_variation3.phpt @@ -0,0 +1,36 @@ +--TEST-- +Test function getservbyname() by substituting argument 1 with emptyUnsetUndefNull values. +--FILE-- + @$unset_var, + 'undefined var' => @$undefined_var, + 'empty string DQ' => "", + 'empty string SQ' => '', + 'uppercase NULL' => NULL, + 'lowercase null' => null, + ); + + +foreach ( $variation_array as $var ) { + var_dump(getservbyname( $var , $protocol ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 1 with emptyUnsetUndefNull values *** +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) diff --git a/ext/standard/tests/general_functions/getservbyname_variation4.phpt b/ext/standard/tests/general_functions/getservbyname_variation4.phpt new file mode 100755 index 0000000000..6033c94363 --- /dev/null +++ b/ext/standard/tests/general_functions/getservbyname_variation4.phpt @@ -0,0 +1,31 @@ +--TEST-- +Test function getservbyname() by substituting argument 1 with float values. +--FILE-- + 10.5, + 'float -10.5' => -10.5, + 'float 12.3456789000e10' => 12.3456789000e10, + 'float -12.3456789000e10' => -12.3456789000e10, + 'float .5' => .5, + ); + + +foreach ( $variation_array as $var ) { + var_dump(getservbyname( $var , $protocol ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 1 with float values *** +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) diff --git a/ext/standard/tests/general_functions/getservbyname_variation5.phpt b/ext/standard/tests/general_functions/getservbyname_variation5.phpt new file mode 100755 index 0000000000..1d3b8f6d74 --- /dev/null +++ b/ext/standard/tests/general_functions/getservbyname_variation5.phpt @@ -0,0 +1,29 @@ +--TEST-- +Test function getservbyname() by substituting argument 1 with int values. +--FILE-- + 0, + 'int 1' => 1, + 'int 12345' => 12345, + 'int -12345' => -2345, + ); + + +foreach ( $variation_array as $var ) { + var_dump(getservbyname( $var , $protocol ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 1 with int values *** +bool(false) +bool(false) +bool(false) +bool(false) diff --git a/ext/standard/tests/general_functions/getservbyname_variation7.phpt b/ext/standard/tests/general_functions/getservbyname_variation7.phpt new file mode 100755 index 0000000000..a0e223c50d --- /dev/null +++ b/ext/standard/tests/general_functions/getservbyname_variation7.phpt @@ -0,0 +1,33 @@ +--TEST-- +Test function getservbyname() by substituting argument 1 with string values. +--FILE-- + "string", + 'string SQ' => 'string', + 'mixed case string' => "sTrInG", + 'heredoc' => $heredoc, + ); + + +foreach ( $variation_array as $var ) { + var_dump(getservbyname( $var , $protocol ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 1 with string values *** +bool(false) +bool(false) +bool(false) +bool(false) diff --git a/ext/standard/tests/general_functions/getservbyname_variation9.phpt b/ext/standard/tests/general_functions/getservbyname_variation9.phpt new file mode 100755 index 0000000000..c1c231e148 --- /dev/null +++ b/ext/standard/tests/general_functions/getservbyname_variation9.phpt @@ -0,0 +1,28 @@ +--TEST-- +Test function getservbyname() by substituting argument 2 with boolean values. +--FILE-- + true, + 'lowercase false' =>false, + 'uppercase TRUE' =>TRUE, + 'uppercase FALSE' =>FALSE, + ); + + +foreach ( $variation_array as $var ) { + var_dump(getservbyname( $service, $var ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 2 with boolean values *** +bool(false) +bool(false) +bool(false) +bool(false) diff --git a/ext/standard/tests/general_functions/getservbyport_basic.phpt b/ext/standard/tests/general_functions/getservbyport_basic.phpt new file mode 100644 index 0000000000..c18c0b7731 --- /dev/null +++ b/ext/standard/tests/general_functions/getservbyport_basic.phpt @@ -0,0 +1,22 @@ +--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-- + +--EXPECTF-- +bool(true) diff --git a/ext/standard/tests/general_functions/proc_nice_basic.phpt b/ext/standard/tests/general_functions/proc_nice_basic.phpt new file mode 100644 index 0000000000..5a95756276 --- /dev/null +++ b/ext/standard/tests/general_functions/proc_nice_basic.phpt @@ -0,0 +1,27 @@ +--TEST-- +proc_nice() basic behaviour +--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-- + 2) + return $matches[2]; + else + return -1; + } + $delta = 10; + $pid = getmypid(); + $niceBefore = getNice($pid); + proc_nice($delta); + $niceAfter = getNice($pid); + var_dump($niceBefore == ($niceAfter - $delta)); +?> +--EXPECTF-- +bool(true) diff --git a/ext/standard/tests/general_functions/proc_nice_error.phpt b/ext/standard/tests/general_functions/proc_nice_error.phpt new file mode 100644 index 0000000000..c50812c863 --- /dev/null +++ b/ext/standard/tests/general_functions/proc_nice_error.phpt @@ -0,0 +1,21 @@ +--TEST-- +Test function proc_nice() by calling it more than or less than its expected arguments +--FILE-- + +--EXPECTF-- +Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in %s on line %d diff --git a/ext/standard/tests/general_functions/proc_nice_variation1.phpt b/ext/standard/tests/general_functions/proc_nice_variation1.phpt new file mode 100644 index 0000000000..b86155c4b2 --- /dev/null +++ b/ext/standard/tests/general_functions/proc_nice_variation1.phpt @@ -0,0 +1,44 @@ +--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) +--FILE-- + '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 long, array given in %s on line %d +bool(false) + +Warning: proc_nice() expects parameter 1 to be long, array given in %s on line %d +bool(false) + +Warning: proc_nice() expects parameter 1 to be long, array given in %s on line %d +bool(false) + +Warning: proc_nice() expects parameter 1 to be long, array given in %s on line %d +bool(false) diff --git a/ext/standard/tests/general_functions/proc_nice_variation2.phpt b/ext/standard/tests/general_functions/proc_nice_variation2.phpt new file mode 100644 index 0000000000..620fe91447 --- /dev/null +++ b/ext/standard/tests/general_functions/proc_nice_variation2.phpt @@ -0,0 +1,33 @@ +--TEST-- +Test function proc_nice() by substituting argument 1 with boolean 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) +--FILE-- + true, + 'lowercase false' =>false, + 'uppercase TRUE' =>TRUE, + 'uppercase FALSE' =>FALSE, + ); + + +foreach ( $variation_array as $var ) { + var_dump(proc_nice( $var ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 1 with boolean values *** +bool(true) +bool(true) +bool(true) +bool(true) diff --git a/ext/standard/tests/general_functions/proc_nice_variation5.phpt b/ext/standard/tests/general_functions/proc_nice_variation5.phpt new file mode 100644 index 0000000000..d8325106ba --- /dev/null +++ b/ext/standard/tests/general_functions/proc_nice_variation5.phpt @@ -0,0 +1,35 @@ +--TEST-- +Test function proc_nice() by substituting argument 1 with int 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) +--FILE-- + 0, + 'int 1' => 1, + 'int 12345' => 12345, + 'int -12345' => -2345, + ); + + +foreach ( $variation_array as $var ) { + var_dump(proc_nice( $var ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 1 with int values *** +bool(true) +bool(true) +bool(true) + +Warning: proc_nice(): Only a super user may attempt to increase the priority of a process in %s on line %d +bool(false) diff --git a/ext/standard/tests/general_functions/proc_nice_variation6.phpt b/ext/standard/tests/general_functions/proc_nice_variation6.phpt new file mode 100644 index 0000000000..b4babd5930 --- /dev/null +++ b/ext/standard/tests/general_functions/proc_nice_variation6.phpt @@ -0,0 +1,52 @@ +--TEST-- +Test function proc_nice() by substituting argument 1 with object values. +--CREDITS-- +Italian PHP TestFest 2009 Cesena 19-20-21 june +Fabio Fabbrucci (fabbrucci@grupporetina.com) +Michele Orselli (mo@ideato.it) +Simone Gentili (sensorario@gmail.com) +--FILE-- + new classWithToString(), + 'instance of classWithoutToString' => new classWithoutToString(), + ); + + +foreach ( $variation_array as $var ) { + var_dump(proc_nice( $var ) ); +} +?> +--EXPECTF-- +*** Test substituting argument 1 with object values *** +Error: 2 - proc_nice() expects parameter 1 to be long, object given, %s(%d) +bool(false) +Error: 2 - proc_nice() expects parameter 1 to be long, object given, %s(%d) +bool(false) diff --git a/ext/standard/tests/misc/time_sleep_until_basic.phpt b/ext/standard/tests/misc/time_sleep_until_basic.phpt new file mode 100644 index 0000000000..7f2f32d243 --- /dev/null +++ b/ext/standard/tests/misc/time_sleep_until_basic.phpt @@ -0,0 +1,14 @@ +--TEST-- +time_sleep_until() function - basic test for time_sleep_until() +--CREDITS-- +Manuel Baldassarri mb@ideato.it +Michele Orselli mo@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- += $time ); +?> +--EXPECT-- +bool(true) diff --git a/ext/standard/tests/misc/time_sleep_until_error1.phpt b/ext/standard/tests/misc/time_sleep_until_error1.phpt new file mode 100644 index 0000000000..9752fd70e3 --- /dev/null +++ b/ext/standard/tests/misc/time_sleep_until_error1.phpt @@ -0,0 +1,13 @@ +--TEST-- +time_sleep_until() function - error test for time_sleep_until() +--CREDITS-- +Fabio Fabbrucci fabbrucci@grupporetina.com +Danilo Sanchi sanchi@grupporetina.com +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + +--EXPECTF-- +Warning: time_sleep_until(): Sleep until to time is less than current time in %s on line 2 +bool(false) diff --git a/ext/standard/tests/misc/time_sleep_until_error3.phpt b/ext/standard/tests/misc/time_sleep_until_error3.phpt new file mode 100644 index 0000000000..64489618ae --- /dev/null +++ b/ext/standard/tests/misc/time_sleep_until_error3.phpt @@ -0,0 +1,12 @@ +--TEST-- +time_sleep_until() function - error test for time_sleep_until() +--CREDITS-- +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + +--EXPECTF-- +Warning: time_sleep_until() expects exactly 1 parameter, 0 given in %s on line 2 +NULL diff --git a/ext/standard/tests/php_ini_loaded_file.phpt b/ext/standard/tests/php_ini_loaded_file.phpt new file mode 100644 index 0000000000..ab26953eac --- /dev/null +++ b/ext/standard/tests/php_ini_loaded_file.phpt @@ -0,0 +1,13 @@ +--TEST-- +Check the php_ini_loaded_file() function. No file is loaded in test, so false ins returned +--CREDITS-- +Sebastian Schürmann +sschuermann@chip.de +Testfest 2009 Munich +--FILE-- + +--EXPECT-- +bool(false) + diff --git a/ext/standard/tests/php_logo_guid.phpt b/ext/standard/tests/php_logo_guid.phpt new file mode 100644 index 0000000000..c644b2893b --- /dev/null +++ b/ext/standard/tests/php_logo_guid.phpt @@ -0,0 +1,13 @@ +--TEST-- +Check the output of the php_logo_guid() function +--CREDITS-- +Sebastian Schürmann +sschuermann@chip.de +Testfest 2009 Munich +--FILE-- + +--EXPECT-- +PHPE9568F34-D428-11d2-A769-00AA001ACF42 + diff --git a/ext/standard/tests/php_real_logo_guid.phpt b/ext/standard/tests/php_real_logo_guid.phpt new file mode 100644 index 0000000000..a9fa7d35d5 --- /dev/null +++ b/ext/standard/tests/php_real_logo_guid.phpt @@ -0,0 +1,12 @@ +--TEST-- +Testing the undocumented function php_real_logo_guid() +--CREDITS-- +Sebastian Schürmann +sschuermann@chip.de +Testfest 2009 Munich +--FILE-- + +--EXPECT-- +PHPE9568F34-D428-11d2-A769-00AA001ACF42 diff --git a/ext/standard/tests/strings/show_source_basic.phpt b/ext/standard/tests/strings/show_source_basic.phpt new file mode 100644 index 0000000000..cfd998fe96 --- /dev/null +++ b/ext/standard/tests/strings/show_source_basic.phpt @@ -0,0 +1,27 @@ +--TEST-- +Test function show_source() by calling it with its expected arguments, more test for highlight_file() +--CREDITS-- +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + +--EXPECTF-- +*** Test by calling method or function with its expected arguments *** + +<?php
echo "*** Test by calling method or function with its expected arguments ***\n";
$foo 'bar';
$baz "something ".$foo."\n";

if ( 
$foo == 'bar' 
{
  
$baz 'baz';
}

 
/* some code here */
   
show_source(__FILE__);

?>
+
+
diff --git a/ext/standard/tests/strings/show_source_variation1.phpt b/ext/standard/tests/strings/show_source_variation1.phpt new file mode 100644 index 0000000000..a9993ed457 --- /dev/null +++ b/ext/standard/tests/strings/show_source_variation1.phpt @@ -0,0 +1,28 @@ +--TEST-- +Test function show_source() by calling it with its expected arguments and php output, more test for highlight_file() +--CREDITS-- +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + +--EXPECTF-- +*** Test by calling method or function with its expected arguments and php output *** +baz + +<?php
echo "*** Test by calling method or function with its expected arguments and php output ***\n";
$foo 'bar';
$baz "something ".$foo."\n";

if ( 
$foo == 'bar' 
{
  
$baz "baz\n";
}

 
/* some code here */
echo $baz;   
show_source(__FILE__);
echo 
$foo;
?>
+
+
bar diff --git a/ext/standard/tests/strings/show_source_variation2.phpt b/ext/standard/tests/strings/show_source_variation2.phpt new file mode 100644 index 0000000000..06ef66c2d2 --- /dev/null +++ b/ext/standard/tests/strings/show_source_variation2.phpt @@ -0,0 +1,27 @@ +--TEST-- +Test function show_source() by calling it with its expected arguments and output to variable, more test for highlight_file() +--CREDITS-- +Francesco Fullone ff@ideato.it +#PHPTestFest Cesena Italia on 2009-06-20 +--FILE-- + +--EXPECTF-- +*** Test by calling method or function with its expected arguments and output to variable *** +string(1987) " +<?php
echo "*** Test by calling method or function with its expected arguments and output to variable ***\n";
$foo 'bar';
$baz "something ".$foo."\n";

if ( 
$foo == 'bar' 
{
  
$baz "baz\n";
}

 
/* some code here */ 
$source show_source(__FILE__true);

var_dump($source);
?>
+
+
" diff --git a/ext/standard/tests/url/get_headers_error_001.phpt b/ext/standard/tests/url/get_headers_error_001.phpt new file mode 100644 index 0000000000..8d5fd11f60 --- /dev/null +++ b/ext/standard/tests/url/get_headers_error_001.phpt @@ -0,0 +1,44 @@ +--TEST-- +Test get_headers() function : error conditions - wrong number of args +--CREDITS-- +June Henriksen +#PHPTestFest2009 Norway 2009-06-09 \o/ +--FILE-- + +--EXPECTF-- +*** Testing get_headers() : error conditions *** + +-- Testing get_headers() function with Zero arguments -- + +Warning: get_headers() expects at least 1 parameter, 0 given in %s on line 12 +NULL + +-- Testing get_headers() function with more than expected no. of arguments -- + +Warning: get_headers() expects at most 2 parameters, 3 given in %s on line 19 +NULL +Done + + + diff --git a/ext/standard/tests/zend_logo_guid.phpt b/ext/standard/tests/zend_logo_guid.phpt new file mode 100644 index 0000000000..d26ed45e9e --- /dev/null +++ b/ext/standard/tests/zend_logo_guid.phpt @@ -0,0 +1,12 @@ +--TEST-- +Checking the zend_logo_guid() functio +--CREDITS-- +Sebastian Schürmann +sschuermann@chip.de +Testfest 2009 Munich +--FILE-- + +--EXPECT-- +PHPE9568F35-D428-11d2-A769-00AA001ACF42 diff --git a/tests/basic/php_egg_logo_guid.phpt b/tests/basic/php_egg_logo_guid.phpt new file mode 100644 index 0000000000..b3c5d7bdfd --- /dev/null +++ b/tests/basic/php_egg_logo_guid.phpt @@ -0,0 +1,13 @@ +--TEST-- +Testing php_egg_logo_guid() function +--FILE-- + +--EXPECT-- +PHPE9568F36-D428-11d2-A769-00AA001ACF42 + +--CREDITS-- +Jason Easter +PHPUG Würzburg +Testfest 2009 2009-06-20 \ No newline at end of file diff --git a/tests/basic/php_logo_guid.phpt b/tests/basic/php_logo_guid.phpt new file mode 100644 index 0000000000..b5724a96ab --- /dev/null +++ b/tests/basic/php_logo_guid.phpt @@ -0,0 +1,10 @@ +--TEST-- +Testing php_logo_guid() function +--FILE-- + +--EXPECT-- +PHPE9568F34-D428-11d2-A769-00AA001ACF42 +--CREDITS-- +Testfest 2009 2009-06-20 \ No newline at end of file diff --git a/tests/basic/php_real_logo_guid.phpt b/tests/basic/php_real_logo_guid.phpt new file mode 100644 index 0000000000..2b9003a350 --- /dev/null +++ b/tests/basic/php_real_logo_guid.phpt @@ -0,0 +1,12 @@ +--TEST-- +Testing php_real_logo_guid() function +--FILE-- + +--EXPECT-- +PHPE9568F34-D428-11d2-A769-00AA001ACF42 +--CREDITS-- +Jason Easter +PHPUG Würzburg +Testfest 2009 2009-06-20 \ No newline at end of file diff --git a/tests/basic/zend_logo_guid.phpt b/tests/basic/zend_logo_guid.phpt new file mode 100644 index 0000000000..23ca0165ae --- /dev/null +++ b/tests/basic/zend_logo_guid.phpt @@ -0,0 +1,13 @@ +--TEST-- +Testing zend_logo_guid() function +--FILE-- + +--EXPECT-- +PHPE9568F35-D428-11d2-A769-00AA001ACF42 + +--CREDITS-- +Jason Easter +PHPUG Würzburg +Testfest 2009 2009-06-20 \ No newline at end of file diff --git a/tests/func/time_sleep_until_basic.phpt b/tests/func/time_sleep_until_basic.phpt new file mode 100644 index 0000000000..def114cc48 --- /dev/null +++ b/tests/func/time_sleep_until_basic.phpt @@ -0,0 +1,15 @@ +--TEST-- +time_sleep_until — Make the script sleep until the specified time +--CREDITS-- +Àlex Corretgé - alex@corretge.cat +--FILE-- + +--EXPECT-- +3 seconds. \ No newline at end of file diff --git a/tests/func/time_sleep_until_error2.phpt b/tests/func/time_sleep_until_error2.phpt new file mode 100644 index 0000000000..bb999b9bef --- /dev/null +++ b/tests/func/time_sleep_until_error2.phpt @@ -0,0 +1,16 @@ +--TEST-- +time_sleep_until — Make the script sleep until the specified time +--CREDITS-- +Àlex Corretgé - alex@corretge.cat +--FILE-- + +--EXPECTF-- +Warning: time_sleep_until(): Sleep until to time is less than current time in %s.php on line %d +0 seconds. \ No newline at end of file -- 2.40.0