]> granicus.if.org Git - php/commitdiff
Fix tests (MFB, etc)
authorArnaud Le Blanc <lbarnaud@php.net>
Fri, 24 Apr 2009 19:47:43 +0000 (19:47 +0000)
committerArnaud Le Blanc <lbarnaud@php.net>
Fri, 24 Apr 2009 19:47:43 +0000 (19:47 +0000)
14 files changed:
ext/standard/tests/filters/php_user_filter_01.phpt
ext/standard/tests/filters/php_user_filter_02.phpt
ext/standard/tests/filters/php_user_filter_03.phpt
ext/standard/tests/general_functions/var_dump_64bit.phpt
ext/standard/tests/network/bug20134.phpt
ext/standard/tests/strings/bug40754.phpt
ext/standard/tests/strings/uuencode.phpt
ext/standard/tests/url/bug47174.phpt
ext/standard/tests/versioning/php_sapi_name.phpt
sapi/cgi/tests/002.phpt
sapi/cgi/tests/003.phpt
sapi/cgi/tests/008.phpt
sapi/cgi/tests/009.phpt
sapi/cli/tests/010.phpt

index 513331e3f752a050b87ab26daf436884c599993d..534b9abf323e2fd0dfbbea24ac2c45eba365efbe 100644 (file)
@@ -14,4 +14,4 @@ class bar extends php_user_filter {
 }
 ?>
 --EXPECTF--
-Fatal error: Declaration of bar::filter() must be compatible with that of php_user_filter::filter() in %s on line %d
+Strict Standards: Declaration of bar::filter() should be compatible with that of php_user_filter::filter() in %s on line %d
index d72342539d0bd4881aa141448d91fb4d33cb598e..73a1f026725f6685abb4a161f6c63a88b436a8ba 100644 (file)
@@ -9,4 +9,4 @@ class foo extends php_user_filter {
 }
 ?>
 --EXPECTF--
-Fatal error: Declaration of foo::filter() must be compatible with that of php_user_filter::filter() in %s on line %d
+Strict Standards: Declaration of foo::filter() should be compatible with that of php_user_filter::filter() in %s on line %d
index 4830eb964be59c3c44b0565e77cc7f9439368149..5962951eee84667f9d5e9bfc1ef583e7b3950b12 100644 (file)
@@ -9,4 +9,4 @@ class foo extends php_user_filter {
 }
 ?>
 --EXPECTF--
-Fatal error: Declaration of foo::onCreate() must be compatible with that of php_user_filter::onCreate() in %s on line %d
+Strict Standards: Declaration of foo::onCreate() should be compatible with that of php_user_filter::onCreate() in %s on line %d
index 38fabc08851338ed114fcd440e0fc79c91608497..73c7872ef08bea19cbf7c34d6169f80c11888c17 100644 (file)
@@ -1909,5 +1909,5 @@ unicode(9) "\0lambda_2"
 
 *** Testing error conditions ***
 
-Warning: Wrong parameter count for var_dump() in %s on line %d
+Warning: var_dump() expects at least 1 parameter, 0 given in %s
 Done
index 0413988814d2b2360fd2edfc48392e5a5b52048a..400e3fb15cc4f96826f2d36ec103bbe3972ae951 100644 (file)
@@ -21,4 +21,4 @@ else {
 ?>
 --EXPECT--
 int(1)
-bool(false)
+string(0) ""
index 88225f180af6e240b3375be09289ef44b1f6f562..6cfe47056ba5c8eb9c20096b4a3bfe5f92811c32 100644 (file)
@@ -26,9 +26,9 @@ var_dump(chunk_split("abcde", $v, "abc"));
 var_dump(substr("abcde", $v, $v));
 
 ?>
---EXPECTF--
-unicode(4) "bcde"
-unicode(6) "abcdex"
+--EXPECTF--    
+%unicode|string%(4) "bcde"
+%unicode|string%(6) "abcdex"
 bool(false)
 bool(false)
 
@@ -59,5 +59,5 @@ bool(false)
 Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 int(2)
-unicode(8) "abcdeabc"
+string(8) "abcdeabc"
 bool(false)
index fdc892cdf99fe5fe60c17d5975df884570b78b81..91c81e80149acbe87f97186aa7f933f1b62fa27e 100644 (file)
@@ -9,7 +9,7 @@ var_dump(convert_uudecode(array()));
 var_dump(convert_uuencode(""));
 var_dump(convert_uudecode(""));
 var_dump($enc = convert_uuencode("~!@#$%^&*()_}{POIUYTREWQQSDFGHJKL:<MNBVCXZ"));
-var_dump(convert_uudecode("!@#$%^YUGFDFGHJKLUYTFBNMLOYT"));
+var_dump(base64_encode(convert_uudecode("!@#$%^YUGFDFGHJKLUYTFBNMLOYT")));
 var_dump(convert_uudecode($enc));
 var_dump($enc = convert_uuencode("not very sophisticated"));
 var_dump(convert_uudecode($enc));
@@ -28,7 +28,7 @@ bool(false)
 unicode(60) "J?B%`(R0E7B8J*"E??7M03TE5651215=145-$1D=(2DM,.CQ-3D)60UA:
 `
 "
-string(1) "%s"
+string(%d) "%s"
 string(42) "~!@#$%^&*()_}{POIUYTREWQQSDFGHJKL:<MNBVCXZ"
 unicode(36) "6;F]T('9E<GD@<V]P:&ES=&EC871E9```
 `
index 6d080632531a2908b79d9ea0fd53ffaee1b11b85..0296dbe753503a10259148830b30ffcdc1afaeaa 100644 (file)
@@ -2,13 +2,13 @@
 Bug #47174 (base64_decode() interprets pad char in mid string as terminator)
 --FILE--
 <?php
-if (base64_decode("dGVzdA==") == base64_decode("dGVzdA==CRAP")) {
+if (base64_decode(b"dGVzdA==") == base64_decode(b"dGVzdA==CRAP")) {
     echo "Same octect data - Signature Valid\n";
 } else {
     echo "Invalid Signature\n";
 }
 
-$in = base64_encode("foo") . '==' . base64_encode("bar");
+$in = base64_encode(b"foo") . b'==' . base64_encode(b"bar");
 var_dump($in, base64_decode($in));
 
 ?>
index 0747b32d66e4414362a04ab068d797801e5659f6..c9d4988d9532d7481bf83f394418ea554a7828df 100644 (file)
@@ -6,4 +6,4 @@ php_sapi_name test
 var_dump(php_sapi_name());
 
 --EXPECTF--
-string(3) "c%ci"
+%unicode|string%(3) "c%ci"
index 66e2424f2858f31100a0cc49675417fdf3ad6e50..884e6521e2d5098cfcd8426989e0e6c47038d563 100644 (file)
@@ -29,24 +29,24 @@ echo "Done\n";
 ?>
 --EXPECTF--    
 string(%d) "X-Powered-By: PHP/%s
-Content-type: text/html
+Content-type: text/html%r; charset=.*|%r
 
-string(3) "111"
+%unicode|string%(3) "111"
 "
 string(%d) "X-Powered-By: PHP/%s
-Content-type: text/html
+Content-type: text/html%r; charset=.*|%r
 
-string(3) "500"
+%unicode|string%(3) "500"
 "
 string(%d) "X-Powered-By: PHP/%s
-Content-type: text/html
+Content-type: text/html%r; charset=.*|%r
 
-string(3) "555"
+%unicode|string%(3) "555"
 "
 string(%d) "X-Powered-By: PHP/%s
-Content-type: text/html
+Content-type: text/html%r; charset=.*|%r
 
-string(3) "555"
-string(10) "/test/path"
+%unicode|string%(3) "555"
+%unicode|string%(10) "/test/path"
 "
 Done
index ea418d104ca507585d46eb07989c9f2da8d8dfdc..533743323f9b8d133c236f05a930452f98e96876 100644 (file)
@@ -42,7 +42,7 @@ echo "Done\n";
 ?>
 --EXPECTF--    
 string(%d) "X-Powered-By: PHP/%s
-Content-type: text/html
+Content-type: text/html%r; charset=.*|%r
 
 
 <?php
@@ -50,12 +50,12 @@ Content-type: text/html
 "
 string(%d) "Status: 404 Not Found
 X-Powered-By: PHP/%s
-Content-type: text/html
+Content-type: text/html%r; charset=.*|%r
 
 No input file specified.
 "
 string(%d) "X-Powered-By: PHP/%s
-Content-type: text/html
+Content-type: text/html%r; charset=.*|%r
 
 <?php  class test { function foo() {} } ?>
 "
index 40140e87925e40a106c499779535c02b02d7b250..7537664cc8462dd3a0e7c8ed4e0c693761aadb89 100644 (file)
@@ -39,7 +39,7 @@ echo "Done\n";
 ?>
 --EXPECTF--    
 string(%d) "X-Powered-By: PHP/%s
-Content-type: text/html
+Content-type: text/html%r; charset=.*|%r
 
 <code><span style="color: #000000">
 <br /><span style="color: #0000BB">&lt;?php<br />$test&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"var"</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//var<br />/*&nbsp;test&nbsp;class&nbsp;*/<br /></span><span style="color: #007700">class&nbsp;</span><span style="color: #0000BB">test&nbsp;</span><span style="color: #007700">{<br />&nbsp;&nbsp;&nbsp;&nbsp;private&nbsp;</span><span style="color: #0000BB">$var&nbsp;</span><span style="color: #007700">=&nbsp;array();<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;static&nbsp;function&nbsp;</span><span style="color: #0000BB">foo</span><span style="color: #007700">(</span><span style="color: #0000BB">Test&nbsp;$arg</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"hello"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$this</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<br /><br /></span><span style="color: #0000BB">$o&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">test</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;<br /></span>
@@ -47,7 +47,7 @@ Content-type: text/html
 </code>"
 string(%d) "Status: 404 Not Found
 X-Powered-By: PHP/%s
-Content-type: text/html
+Content-type: text/html%r; charset=.*|%r
 
 No input file specified.
 "
index 1c429ac1985cc5c57190e24c655c3e6873ba7e26..c8e9ae1af1242a6af3c38c82e9745e063e74f0ef 100644 (file)
@@ -24,7 +24,7 @@ echo "Done\n";
 ?>
 --EXPECTF--
 X-Powered-By: PHP/%s
-Content-type: text/html
+Content-type: text/html%r; charset=.*|%r
 
 string(%d) "%s/x"
 Done
index da966f7114fa9daf6a7aaebd03eba3db2ec46d5f..77c76c1940d01c6857208ef5d8963ec052698b42 100644 (file)
@@ -12,8 +12,8 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
 
 $php = getenv('TEST_PHP_EXECUTABLE');
 
-$filename = dirname(__FILE__)."/010.test.php";
-$filename_txt = dirname(__FILE__)."/010.test.txt";
+$filename = __DIR__."/010.test.php";
+$filename_txt = __DIR__."/010.test.txt";
 
 $code = '
 <?php
@@ -25,23 +25,22 @@ file_put_contents($filename, $code);
 
 $txt = '
 test
-hello
-';
+hello';
 
 file_put_contents($filename_txt, $txt);
 
 var_dump(`cat "$filename_txt" | "$php" -n -F "$filename"`);
 
-@unlink($filename);
-@unlink($filename_txt);
-
-echo "Done\n";
+?>
+===DONE===
+--CLEAN--
+<?php
+@unlink(__DIR__."/010.test.php");
+@unlink(__DIR__."/010.test.txt");
 ?>
 --EXPECTF--    
-string(38) "
+string(25) "
 string(10) "test
 hello"
-
-bool(false)
 "
-Done
+===DONE===