]> granicus.if.org Git - php/commitdiff
Silence false positives on test results
authorSara Golemon <pollita@php.net>
Thu, 6 Apr 2006 20:03:27 +0000 (20:03 +0000)
committerSara Golemon <pollita@php.net>
Thu, 6 Apr 2006 20:03:27 +0000 (20:03 +0000)
ext/standard/tests/file/stream_get_line.phpt
ext/standard/tests/file/userfilters.phpt
ext/standard/tests/file/userstreams.phpt
ext/standard/tests/filters/basic.phpt

index 51261f7043ba9ecb7f8ce7b4caccdb5579420a27..89798ef95eae3f767de01b54ae0505c6e072a84b 100644 (file)
@@ -2,10 +2,9 @@
 Crash inside stream_get_line(), when length=0
 --FILE--
 <?php
-die("Temporary unavailable in unicode PHP. Remove this line.");
 $path = dirname(__FILE__) . '/test.html';
 
-file_put_contents($path, "foo<br>bar<br>foo");
+file_put_contents($path, b"foo<br>bar<br>foo");
 $fp = fopen($path, "r");
 while ($fp && !feof($fp)) {
        echo stream_get_line($fp, 0, "<br>")."\n";
index dfa8376fffc682bf24b8bdc38c4ff4fd784f529d..2246b5d8a4e082a04e8ff854a78e5b3521b1339f 100644 (file)
@@ -20,7 +20,7 @@ class testfilter extends php_user_filter {
 
 stream_filter_register('testfilter','testfilter');
 
-$text = "Hello There!";
+$text = b"Hello There!";
 
 $fp = tmpfile();
 fwrite($fp, $text);
index 9b80508b3b1b33f9c3c315628de6952de8d1cdff..b5a9707e95d14a601e5183ab5ce4521a23bf32e7 100644 (file)
@@ -67,7 +67,7 @@ for ($i = 0; $i < 30; $i++) {
 /* store the data in a regular file so that we can compare
  * the results */
 $tf = tmpfile();
-fwrite($tf, $DATA);
+fwrite($tf, (binary)$DATA);
 $n = ftell($tf);
 rewind($tf) or die("failed to rewind tmp file!");
 if (ftell($tf) != 0)
index 13a79e2cd18db567bd8cb347d9394ecbc83decd2..e4fe833877226b3e7ec859914f78f649d35ed0a7 100644 (file)
@@ -4,7 +4,7 @@ basic stream filter tests
 <?php
 # vim600:syn=php:
 
-$text = "Hello There!";
+$text = b"Hello There!";
 $filters = array("string.rot13", "string.toupper", "string.tolower");
 
 function filter_test($names)