diff options
author | Stanislav Malyshev <stas@php.net> | 2011-08-01 03:42:02 +0000 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2011-08-01 03:42:02 +0000 |
commit | 1c83f5e04cb00c3cb3a9f20637021085d164dd97 (patch) | |
tree | e0eee5c107bc33e1515af1fa026cd99d99ef3817 /ext/standard | |
parent | 3b7cdd02279e8e57c2f39e7f16afb7c2924ed204 (diff) | |
download | php-git-1c83f5e04cb00c3cb3a9f20637021085d164dd97.tar.gz |
fix tests
Diffstat (limited to 'ext/standard')
18 files changed, 71 insertions, 61 deletions
diff --git a/ext/standard/tests/file/copy_variation4.phpt b/ext/standard/tests/file/copy_variation4.phpt Binary files differindex 48386743f3..3c8224da0a 100644 --- a/ext/standard/tests/file/copy_variation4.phpt +++ b/ext/standard/tests/file/copy_variation4.phpt diff --git a/ext/standard/tests/file/parse_ini_file_variation3.phpt b/ext/standard/tests/file/parse_ini_file_variation3.phpt index 77ffa07415..43b0274ea9 100644 --- a/ext/standard/tests/file/parse_ini_file_variation3.phpt +++ b/ext/standard/tests/file/parse_ini_file_variation3.phpt @@ -79,7 +79,7 @@ foreach($newdirs as $newdir) { New include path is : %sparse_ini_file_variation3.dir1%sparse_ini_file_variation3.dir2%sparse_ini_file_variation3.dir3%S array(11) { ["error_reporting"]=> - string(5) "30719" + string(5) "32767" ["display_errors"]=> string(1) "1" ["display_startup_errors"]=> @@ -101,4 +101,4 @@ array(11) { ["docref_ext"]=> string(5) ".html" } -===Done===
\ No newline at end of file +===Done=== diff --git a/ext/standard/tests/file/stream_rfc2397_006.phpt b/ext/standard/tests/file/stream_rfc2397_006.phpt index dab6cd5612..e6694a2861 100755 --- a/ext/standard/tests/file/stream_rfc2397_006.phpt +++ b/ext/standard/tests/file/stream_rfc2397_006.phpt @@ -21,8 +21,11 @@ foreach($streams as $stream) ===DONE=== <?php exit(0); ?> --EXPECTF-- -string(0) "" -string(6) "foobar" +Warning: file_get_contents() expects parameter 1 to be a valid path, string given in %s line %d +NULL + +Warning: file_get_contents() expects parameter 1 to be a valid path, string given in %s line %d +NULL string(13) "foobar foobar" Warning: file_get_contents(data:;base64,#Zm9vYmFyIGZvb2Jhc=): failed to open stream: rfc2397: unable to decode in %sstream_rfc2397_006.php on line %d diff --git a/ext/standard/tests/file/tempnam_variation7.phpt b/ext/standard/tests/file/tempnam_variation7.phpt index dd823d47a2..b21a123ab7 100644 --- a/ext/standard/tests/file/tempnam_variation7.phpt +++ b/ext/standard/tests/file/tempnam_variation7.phpt @@ -98,19 +98,19 @@ File created in => temp dir Warning: tempnam() expects parameter 1 to be a valid path, string given in %s on line %d -- File is not created -- -Warning: unlink(): Invalid argument in %s on line %d +Warning: unlink(): No such file or directory in %s on line %d -- Iteration 7 -- Warning: tempnam() expects parameter 1 to be a valid path, array given in %s on line %d -- File is not created -- -Warning: unlink(): Invalid argument in %s on line %d +Warning: unlink(): No such file or directory in %s on line %d -- Iteration 8 -- -File name is => /tmp/tempnam_variation3.tmp%s +File name is => %s/tempnam_variation3.tmp%s File permissions are => 100600 File created in => temp dir -- Iteration 9 -- -File name is => /tmp/tempnam_variation3.tmp%s +File name is => %s/tempnam_variation3.tmp%s File permissions are => 100600 File created in => temp dir diff --git a/ext/standard/tests/general_functions/getservbyname_variation10.phpt b/ext/standard/tests/general_functions/getservbyname_variation10.phpt index 70aa567646..c7ed144f10 100755 --- a/ext/standard/tests/general_functions/getservbyname_variation10.phpt +++ b/ext/standard/tests/general_functions/getservbyname_variation10.phpt @@ -1,5 +1,11 @@ --TEST-- Test function getservbyname() by substituting argument 2 with emptyUnsetUndefNull values. +--SKIPIF-- +<?php +if(PHP_OS == 'Darwin') { + die("skip.. Mac OS X is fine with NULLs in getservbyname"); +} +?> --FILE-- <?php diff --git a/ext/standard/tests/general_functions/getservbyname_variation9.phpt b/ext/standard/tests/general_functions/getservbyname_variation9.phpt index c1c231e148..eef2744c26 100755 --- a/ext/standard/tests/general_functions/getservbyname_variation9.phpt +++ b/ext/standard/tests/general_functions/getservbyname_variation9.phpt @@ -1,5 +1,11 @@ --TEST-- Test function getservbyname() by substituting argument 2 with boolean values. +--SKIPIF-- +<?php +if(PHP_OS == 'Darwin') { + die("skip.. Mac OS X is fine with NULLs in getservbyname"); +} +?> --FILE-- <?php diff --git a/ext/standard/tests/general_functions/parse_ini_basic.data b/ext/standard/tests/general_functions/parse_ini_basic.data index fdbd55cbf9..cafbb15742 100644 --- a/ext/standard/tests/general_functions/parse_ini_basic.data +++ b/ext/standard/tests/general_functions/parse_ini_basic.data @@ -12,7 +12,7 @@ boolno = no string = asdadfsdjkslkj ¡@£$$ { }[ ]/%#¤ sqstring = 'adsasdadasdasd' dqstring = "asdadfsdjkslkj ¡@£$$ { } !^~|¥¥{[()/)&/% ¤ # #" -php_constant = E_ALL +php_constant = E_WARNING user_constant = TEST_CONSTANT [basic with whitespace] @@ -28,7 +28,7 @@ boolnone = none boolno = no sqstring = 'adsasdadasdasd' dqstring = "asdadfsdjkslkj ¡@£$$€¥¥{[()/)&/%#¤" -php_constant = E_ALL +php_constant = E_WARNING [comments] ; some comment diff --git a/ext/standard/tests/general_functions/parse_ini_basic.phpt b/ext/standard/tests/general_functions/parse_ini_basic.phpt index bdd44e0a2f..0c0591e7eb 100644 --- a/ext/standard/tests/general_functions/parse_ini_basic.phpt +++ b/ext/standard/tests/general_functions/parse_ini_basic.phpt @@ -45,7 +45,7 @@ array(26) { ["dqstring"]=> string(51) "asdadfsdjkslkj ¡@£$$ { } !^~|¥¥{[()/)&/% ¤ # #" ["php_constant"]=> - string(5) "30719" + string(1) "2" ["user_constant"]=> string(21) "this_is_test_constant" } @@ -76,7 +76,7 @@ array(26) { ["dqstring"]=> string(41) "asdadfsdjkslkj ¡@£$$€¥¥{[()/)&/%#¤" ["php_constant"]=> - string(5) "30719" + string(1) "2" } ["comments"]=> array(1) { diff --git a/ext/standard/tests/general_functions/parse_ini_booleans.phpt b/ext/standard/tests/general_functions/parse_ini_booleans.phpt index 37965789e0..7b012c50f6 100644 --- a/ext/standard/tests/general_functions/parse_ini_booleans.phpt +++ b/ext/standard/tests/general_functions/parse_ini_booleans.phpt @@ -15,15 +15,15 @@ array(3) { ["error_reporting values"]=> array(6) { ["foo"]=> - string(7) "30719 8" + string(7) "32767 8" ["error_reporting"]=> - string(5) "30719" + string(5) "32767" ["error_reporting1"]=> string(4) "4177" ["error_reporting2"]=> - string(5) "30711" + string(5) "32759" ["error_reporting3"]=> - string(5) "30711" + string(5) "32759" ["error_reporting4"]=> string(5) "32759" } diff --git a/ext/standard/tests/general_functions/phpinfo.phpt b/ext/standard/tests/general_functions/phpinfo.phpt index 10b8e5531a..01b0c62c3b 100644 --- a/ext/standard/tests/general_functions/phpinfo.phpt +++ b/ext/standard/tests/general_functions/phpinfo.phpt @@ -36,7 +36,6 @@ Debug Build => %s Thread Safety => %s Zend Signal Handling => %s Zend Memory Manager => %s -Zend Signal Handling => %s Zend Multibyte Support => %s IPv6 Support => %s DTrace Support => %s diff --git a/ext/standard/tests/general_functions/proc_nice_basic.phpt b/ext/standard/tests/general_functions/proc_nice_basic.phpt index 3a958901a2..83b5165679 100644 --- a/ext/standard/tests/general_functions/proc_nice_basic.phpt +++ b/ext/standard/tests/general_functions/proc_nice_basic.phpt @@ -13,7 +13,7 @@ if(!function_exists('proc_nice')) die("skip. proc_nice not available "); <?php function getNice($id) { - $res = shell_exec('ps -p ' . $id .' -o "%p %n"'); + $res = shell_exec('ps -p ' . $id .' -o "pid,nice"'); preg_match('/^\s*\w+\s+\w+\s*(\d+)\s+(\d+)/m', $res, $matches); if (count($matches) > 2) return $matches[2]; diff --git a/ext/standard/tests/general_functions/proc_nice_error.phpt b/ext/standard/tests/general_functions/proc_nice_error.phpt index 09f84fa552..a05a18263e 100644 --- a/ext/standard/tests/general_functions/proc_nice_error.phpt +++ b/ext/standard/tests/general_functions/proc_nice_error.phpt @@ -6,20 +6,23 @@ if(!function_exists('proc_nice')) die("skip. proc_nice not available "); ?> --FILE-- <?php +echo "*** Test by calling method or function with incorrect numbers of arguments ***\n"; +$priority = 1; -echo "*** Test by calling method or function with incorrect numbers of arguments ***\n" +$extra_arg = 1; -$priority = - - -$extra_arg = - -var_dump(proc_nice( $priority, $extra_arg ) ); +var_dump(proc_nice( $priority, $extra_arg) ); var_dump(proc_nice( ) ); ?> --EXPECTF-- -Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in %s on line %d +*** Test by calling method or function with incorrect numbers of arguments *** + +Warning: proc_nice() expects exactly 1 parameter, 2 given in %s line %d +bool(false) + +Warning: proc_nice() expects exactly 1 parameter, 0 given in %s line %d +bool(false) diff --git a/ext/standard/tests/general_functions/set_magic_quotes_runtime_basic.phpt b/ext/standard/tests/general_functions/set_magic_quotes_runtime_basic.phpt index eb647435ac..3e5f6f0ff7 100644 --- a/ext/standard/tests/general_functions/set_magic_quotes_runtime_basic.phpt +++ b/ext/standard/tests/general_functions/set_magic_quotes_runtime_basic.phpt @@ -13,11 +13,6 @@ echo "Simple testcase for set_magic_quotes_runtime() function - basic test\n"; $g = get_magic_quotes_runtime(); echo "\n-- magic quotes runtime set in INI file: " . $g . "--\n"; -echo "\n-- Set magic quotes runtime to 1: --\n"; -var_dump(set_magic_quotes_runtime(1)); -$g = get_magic_quotes_runtime(); -echo "\n-- magic quotes runtime after set: " . $g . " --\n"; - echo "\n-- Set magic quotes runtime to 0: --\n"; var_dump(set_magic_quotes_runtime(0)); $g = get_magic_quotes_runtime(); @@ -33,26 +28,23 @@ echo "\n-- magic quotes runtime after set: " . $g . " --\n"; --EXPECTF-- Simple testcase for set_magic_quotes_runtime() function - basic test --- magic quotes runtime set in INI file: 0-- - --- Set magic quotes runtime to 1: -- - -Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d -bool(true) +Deprecated: Function get_magic_quotes_runtime() is deprecated in %s on line %d --- magic quotes runtime after set: 1 -- +-- magic quotes runtime set in INI file: -- -- Set magic quotes runtime to 0: -- Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d -bool(true) +bool(false) --- magic quotes runtime after set: 0 -- +Deprecated: Function get_magic_quotes_runtime() is deprecated in %s on line %d + +-- magic quotes runtime after set: -- -- Set magic quotes runtime to 1: -- Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d -bool(true) --- magic quotes runtime after set: 1 -- -===DONE===
\ No newline at end of file +Fatal error: set_magic_quotes_runtime(): magic_quotes_runtime is not supported anymore in Unknown on line 0 + + diff --git a/ext/standard/tests/mail/mail_basic2.phpt b/ext/standard/tests/mail/mail_basic2.phpt index 2ac4d20b1f..8967d18c4f 100644 --- a/ext/standard/tests/mail/mail_basic2.phpt +++ b/ext/standard/tests/mail/mail_basic2.phpt @@ -6,7 +6,7 @@ if(substr(PHP_OS, 0, 3) == "WIN") die("skip Won't run on Windows"); ?> --INI-- -sendmail_path="sed > /tmp/php_test_mailBasic2.out" +sendmail_path="cat > /tmp/php_test_mailBasic2.out" mail.add_x_header = Off --FILE-- <?php @@ -24,7 +24,7 @@ $to = 'user@company.com'; $subject = 'Test Subject'; $message = 'A Message'; $additional_headers = 'KHeaders'; -$additional_parameters = "-e '5 a--- Extras'"; +$additional_parameters = "-n"; $outFile = "/tmp/php_test_mailBasic2.out"; @unlink($outFile); @@ -36,14 +36,13 @@ echo file_get_contents($outFile); unlink($outFile); ?> ===DONE=== ---EXPECT-- +--EXPECTF-- *** Testing mail() : basic functionality *** -- extra parameters -- bool(true) -To: user@company.com -Subject: Test Subject -KHeaders - -A Message ---- Extras +%w1%wTo: user@company.com +%w2%wSubject: Test Subject +%w3%wKHeaders +%w4%w +%w5%wA Message ===DONE=== diff --git a/ext/standard/tests/mail/mail_variation2.phpt b/ext/standard/tests/mail/mail_variation2.phpt index d6eafd2e52..c16c2706a7 100644 --- a/ext/standard/tests/mail/mail_variation2.phpt +++ b/ext/standard/tests/mail/mail_variation2.phpt @@ -1,8 +1,8 @@ --TEST-- Test mail() function : variation force extra parameters --INI-- -sendmail_path="sed > /tmp/php_test_mailVariation2.out" -mail.force_extra_parameters="-e4a---forced-params" +sendmail_path="cat > /tmp/php_test_mailVariation2.out" +mail.force_extra_parameters="-n" mail.add_x_header = Off --SKIPIF-- <?php @@ -33,12 +33,11 @@ unlink($outFile); ?> ===DONE=== ---EXPECT-- +--EXPECTF-- *** Testing mail() : basic functionality *** bool(true) -To: user@company.com -Subject: Test Subject - -A Message ----forced-params +%w1%wTo: user@company.com +%w2%wSubject: Test Subject +%w3%w +%w4%wA Message ===DONE=== diff --git a/ext/standard/tests/serialize/serialization_miscTypes_001.phpt b/ext/standard/tests/serialize/serialization_miscTypes_001.phpt Binary files differindex 038068249e..548a67345f 100644 --- a/ext/standard/tests/serialize/serialization_miscTypes_001.phpt +++ b/ext/standard/tests/serialize/serialization_miscTypes_001.phpt diff --git a/ext/standard/tests/streams/bug54623.phpt b/ext/standard/tests/streams/bug54623.phpt index cd83854f43..63e907a5af 100644 --- a/ext/standard/tests/streams/bug54623.phpt +++ b/ext/standard/tests/streams/bug54623.phpt @@ -14,4 +14,6 @@ fwrite($sock, "3"); int(%d) int(%d) +Notice: fwrite(): send of 1 bytes failed with errno=61 Connection refused in %s on line %d + Warning: fwrite(): %d is not a valid stream resource in %s on line %d diff --git a/ext/standard/tests/strings/htmlentities04.phpt b/ext/standard/tests/strings/htmlentities04.phpt index 565c11bbc8..2501ff092c 100644 --- a/ext/standard/tests/strings/htmlentities04.phpt +++ b/ext/standard/tests/strings/htmlentities04.phpt @@ -16,5 +16,6 @@ mbstring.internal_encoding=pass setlocale( LC_CTYPE, "ja_JP.EUC-JP", "ja_JP.eucJP" ); var_dump(htmlentities("\xa1\xa2\xa1\xa3\xa1\xa4", ENT_QUOTES, '')); ?> ---EXPECT-- +--EXPECTF-- +Strict Standards: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d string(6) "¡¢¡£¡¤" |