From: Stanislav Malyshev Date: Mon, 1 Aug 2011 01:00:57 +0000 (+0000) Subject: fix failing tests X-Git-Tag: php-5.4.0alpha3~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3b7cdd02279e8e57c2f39e7f16afb7c2924ed204;p=php fix failing tests --- diff --git a/ext/dom/tests/DOMDocument_loadHTML_error1.phpt b/ext/dom/tests/DOMDocument_loadHTML_error1.phpt index c7b5e614d7..de8d349e9f 100644 --- a/ext/dom/tests/DOMDocument_loadHTML_error1.phpt +++ b/ext/dom/tests/DOMDocument_loadHTML_error1.phpt @@ -12,4 +12,4 @@ $doc = new DOMDocument(); $doc->loadHTML(); ?> --EXPECTF-- -Warning: DOMDocument::loadHTML() expects exactly 1 parameter, 0 given in %s on line %d +Warning: DOMDocument::loadHTML() expects at least 1 parameter, 0 given in %s on line %d diff --git a/ext/dom/tests/DOMDocument_relaxNGValidate_error2.phpt b/ext/dom/tests/DOMDocument_relaxNGValidate_error2.phpt index 85749210b0..7c5f8901e7 100644 --- a/ext/dom/tests/DOMDocument_relaxNGValidate_error2.phpt +++ b/ext/dom/tests/DOMDocument_relaxNGValidate_error2.phpt @@ -23,3 +23,9 @@ var_dump($result); ?> --EXPECTF-- +Warning: DOMDocument::relaxNGValidate(): I/O warning : failed to load external entity "%s/foo.rng" in %s on line %d + +Warning: DOMDocument::relaxNGValidate(): xmlRelaxNGParse: could not load %s/foo.rng in %s on line %d + +Warning: DOMDocument::relaxNGValidate(): Invalid RelaxNG in %s on line %d +bool(false) diff --git a/ext/fileinfo/tests/finfo_open_001.phpt b/ext/fileinfo/tests/finfo_open_001.phpt index 9513b54bad..de55ae353f 100644 --- a/ext/fileinfo/tests/finfo_open_001.phpt +++ b/ext/fileinfo/tests/finfo_open_001.phpt @@ -18,6 +18,24 @@ Warning: finfo_open() expects parameter 2 to be a valid path, string given in %s bool(false) resource(%d) of type (file_info) resource(%d) of type (file_info) + +Warning: finfo_open(%s/123): failed to open stream: No such file or directory in %s on line %d + +Warning: finfo_open(%s/123): failed to open stream: No such file or directory in %s on line %d + +Warning: finfo_open(): Failed to load magic database at '%s/123'. in %s on line %d bool(false) + +Warning: finfo_open(%s/1): failed to open stream: No such file or directory in %s on line %d + +Warning: finfo_open(%s/1): failed to open stream: No such file or directory in %s on line %d + +Warning: finfo_open(): Failed to load magic database at '%s/1'. in %s on line %d bool(false) + +Warning: finfo_open(/foo/bar/inexistent): failed to open stream: No such file or directory in %s on line %d + +Warning: finfo_open(/foo/bar/inexistent): failed to open stream: No such file or directory in %s on line %d + +Warning: finfo_open(): Failed to load magic database at '/foo/bar/inexistent'. in %s on line %d bool(false) diff --git a/ext/fileinfo/tests/finfo_open_error.phpt b/ext/fileinfo/tests/finfo_open_error.phpt index 2876b17884..80a6bfd637 100644 --- a/ext/fileinfo/tests/finfo_open_error.phpt +++ b/ext/fileinfo/tests/finfo_open_error.phpt @@ -26,6 +26,12 @@ var_dump( new finfo('foobar') ); ===DONE=== --EXPECTF-- *** Testing finfo_open() : error functionality *** + +Warning: finfo_open(%s/foobarfile): failed to open stream: No such file or directory in %s on line %d + +Warning: finfo_open(%s/foobarfile): failed to open stream: No such file or directory in %s on line %d + +Warning: finfo_open(): Failed to load magic database at '%s/foobarfile'. in %s on line %d bool(false) Warning: finfo_open() expects parameter 1 to be long, array given in %s on line %d @@ -37,10 +43,10 @@ bool(false) Notice: finfo_open(): Warning: using regular magic file `%s' in %s on line %d resource(%d) of type (file_info) -Warning: finfo_open() expects parameter 1 to be long, %unicode_string_optional% given in %s on line %d +Warning: finfo_open() expects parameter 1 to be long, string given in %s on line %d bool(false) -Warning: finfo::finfo() expects parameter 1 to be long, %unicode_string_optional% given in %s on line %d +Warning: finfo::finfo() expects parameter 1 to be long, string given in %s on line %d object(finfo)#%d (%d) { } ===DONE=== diff --git a/ext/iconv/tests/bug52941.phpt b/ext/iconv/tests/bug52941.phpt index 753c9ada14..31aabd5e46 100644 --- a/ext/iconv/tests/bug52941.phpt +++ b/ext/iconv/tests/bug52941.phpt @@ -32,10 +32,10 @@ var_dump($decoded['To']); string(17) "" string(29) "=?ks_c_5601-1987?B?UkU6odk=?=" string(33) "=?ks_c_5601-1987?B?UkU6odk=?= Foo" -string(32) "=?ks_c_5601-1987?B?UkU6odk=?=Foo" +string(33) "=?ks_c_5601-1987?B?UkU6odk=?= Foo" string(18) "" string(17) "" string(29) "=?ks_c_5601-1987?B?UkU6odk=?=" string(33) "=?ks_c_5601-1987?B?UkU6odk=?= Foo" -string(32) "=?ks_c_5601-1987?B?UkU6odk=?=Foo" +string(33) "=?ks_c_5601-1987?B?UkU6odk=?= Foo" string(18) "" diff --git a/ext/iconv/tests/iconv_stream_filter.phpt b/ext/iconv/tests/iconv_stream_filter.phpt index 6a60bafeb8..003c631846 100644 --- a/ext/iconv/tests/iconv_stream_filter.phpt +++ b/ext/iconv/tests/iconv_stream_filter.phpt @@ -34,6 +34,8 @@ string(2) "42" string(20) "a4b3a4f3a4cba4c1a4cf" string(10) "69636f6e76" string(2) "0a" + +Warning: fread(): iconv stream filter ("ISO-2022-JP"=>"EUC-JP"): invalid multibyte sequence in %s on line %d bool(true) bool(true) bool(true) diff --git a/ext/mbstring/tests/bug43301.phpt b/ext/mbstring/tests/bug43301.phpt index 310426a142..1a22e4b64d 100644 --- a/ext/mbstring/tests/bug43301.phpt +++ b/ext/mbstring/tests/bug43301.phpt @@ -15,7 +15,7 @@ echo mb_ereg_replace($ptr,'$1',$txt,'e'); ?> --EXPECTF-- -Parse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in %sbug43301.php(%d) : mbregex replace on line 1 +Parse error: syntax error, unexpected '1' (T_LNUMBER), expecting variable (T_VARIABLE) or '$' in %sbug43301.php(%d) : mbregex replace on line %d Fatal error: mb_ereg_replace(): Failed evaluating code: $1 in %sbug43301.php on line %d diff --git a/ext/mcrypt/tests/blowfish.phpt b/ext/mcrypt/tests/blowfish.phpt index bd8df9d14d..a133091d78 100644 --- a/ext/mcrypt/tests/blowfish.phpt +++ b/ext/mcrypt/tests/blowfish.phpt @@ -4,10 +4,12 @@ Test for blowfish compatibility --FILE-- ---EXPECTF-- +--EXPECT-- array(15) { ["name1"]=> string(8) "testname" @@ -77,28 +77,28 @@ array(15) { string(8) "testname" ["name3"]=> string(8) "testname" - ["name\\4"]=> + ["name\4"]=> string(8) "testname" - ["name\\5"]=> + ["name\5"]=> string(8) "testname" - ["name\\\'6"]=> + ["name\'6"]=> string(8) "testname" - ["name\\\"7"]=> + ["name\"7"]=> string(8) "testname" - ["name\\8"]=> + ["name\8"]=> string(8) "testname" - ["name\\9"]=> + ["name\9"]=> string(8) "testname" - ["name\'10"]=> + ["name'10"]=> string(8) "testname" - ["name\\\"11"]=> + ["name\"11"]=> string(8) "testname" - ["name\\12"]=> + ["name\12"]=> string(8) "testname" - ["name\\13"]=> + ["name\13"]=> string(8) "testname" - ["name\\\'14"]=> + ["name\'14"]=> string(8) "testname" - ["name\"15"]=> + ["name"15"]=> string(8) "testname" } diff --git a/tests/basic/bug46313-win.phpt b/tests/basic/bug46313-win.phpt index e588bec767..63da7bb67e 100644 --- a/tests/basic/bug46313-win.phpt +++ b/tests/basic/bug46313-win.phpt @@ -3,9 +3,7 @@ Bug #46313 (Magic quotes broke $_FILES) --SKIPIF-- --INI-- -magic_quotes_gpc=1 file_uploads=1 -register_globals=1 --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 @@ -62,66 +60,3 @@ string(%d) "%s" bool(true) Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0 Warning: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0 - ---TEST-- -Bug #46313 (Magic quotes broke $_FILES) ---SKIPIF-- - ---INI-- -magic_quotes_gpc=1 -file_uploads=1 ---POST_RAW-- -Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 ------------------------------20896060251896012921717172737 -Content-Disposition: form-data; name="o1'file"; filename="o1'file.png" -Content-Type: text/plain-file1 - -1 ------------------------------20896060251896012921717172737 -Content-Disposition: form-data; name="o2'file"; filename="o2'file2.txt" -Content-Type: text/plain-file2 - -2 ------------------------------20896060251896012921717172737-- ---FILE-- - ---EXPECTF-- -array(2) { - ["o1\'file"]=> - array(5) { - ["name"]=> - string(12) "o1" - ["type"]=> - string(16) "text/plain-file1" - ["tmp_name"]=> - string(14) "%s" - ["error"]=> - int(0) - ["size"]=> - int(1) - } - ["o2\'file"]=> - array(5) { - ["name"]=> - string(13) "o2" - ["type"]=> - string(16) "text/plain-file2" - ["tmp_name"]=> - string(14) "%s" - ["error"]=> - int(0) - ["size"]=> - int(1) - } -} -string(12) "o1" -bool(true) -string(%d) "%s" -bool(true) -