From: Zoe Slattery Date: Thu, 22 Jan 2009 22:01:04 +0000 (+0000) Subject: fixed tests X-Git-Tag: php-5.4.0alpha1~191^2~4419 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3234eeda678cfc9a20286e0424791b5fe8f77af5;p=php fixed tests --- diff --git a/ext/standard/tests/file/fopen_variation12.phpt b/ext/standard/tests/file/fopen_variation12.phpt index 54a1fa93e9..9df4490236 100644 --- a/ext/standard/tests/file/fopen_variation12.phpt +++ b/ext/standard/tests/file/fopen_variation12.phpt @@ -1,7 +1,5 @@ --TEST-- Test fopen() function : variation: use include path (path is bad) create a file (relative) ---XFAIL-- -Pending completion of Unicode streams --CREDITS-- Dave Kelsey --FILE-- @@ -12,16 +10,15 @@ Dave Kelsey * Alias to functions: */ -echo "*** Testing fopen() : variation ***\n"; set_include_path("rubbish"); testme(); restore_include_path(); function testme() { - $tmpfile = 'fopen_variation12.tmp'; + $tmpfile = basename(__FILE__, ".php") . ".tmp"; $h = fopen($tmpfile, "w", true); - fwrite($h, "This is the test file"); + fwrite($h, (binary) "This is the test file"); fclose($h); @@ -35,8 +32,9 @@ function testme() { unlink($tmpfile); } + $scriptDirFile = dirname(__FILE__).'/'.$tmpfile; - $h = fopen($scriptDirFile, "r"); + $h = @fopen($scriptDirFile, "r"); if ($h === false) { echo "Not created in script dir\n"; } @@ -49,7 +47,6 @@ function testme() { ?> ===DONE=== --EXPECT-- -*** Testing fopen() : variation *** -Not created in working dir -created in script dir +created in working dir +Not created in script dir ===DONE=== diff --git a/ext/standard/tests/file/fopen_variation16.phpt b/ext/standard/tests/file/fopen_variation16.phpt index 059098ff57..3f220aa7c0 100644 --- a/ext/standard/tests/file/fopen_variation16.phpt +++ b/ext/standard/tests/file/fopen_variation16.phpt @@ -2,8 +2,6 @@ Test fopen() function : variation: use include path create and read a file (relative) --CREDITS-- Dave Kelsey ---XFAIL-- -Bug #46680 --FILE-- ===DONE=== --EXPECT-- -*** Testing fopen() : variation *** -created in dir1 -found file again in dir1 -created in dir1 -found file again in dir1 +Not created in dir1 +found file - not in dir1 +Not created in dir1 +found file - not in dir1 ===DONE===