[PHP-CVS] cvs: php-src /ext/standard/tests/file file_put_contents_variation4.phpt

2009-01-22 Thread Zoe Slattery
zoe Thu Jan 22 20:51:55 2009 UTC

  Modified files:  
/php-src/ext/standard/tests/filefile_put_contents_variation4.phpt 
  Log:
  Fixed test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/file_put_contents_variation4.phpt?r1=1.3r2=1.4diff_format=u
Index: php-src/ext/standard/tests/file/file_put_contents_variation4.phpt
diff -u php-src/ext/standard/tests/file/file_put_contents_variation4.phpt:1.3 
php-src/ext/standard/tests/file/file_put_contents_variation4.phpt:1.4
--- php-src/ext/standard/tests/file/file_put_contents_variation4.phpt:1.3   
Wed Dec  3 11:27:11 2008
+++ php-src/ext/standard/tests/file/file_put_contents_variation4.phpt   Thu Jan 
22 20:51:54 2009
@@ -1,7 +1,5 @@
 --TEST--
 Test file_put_contents() function : variation - include path testing
---XFAIL--
-Pending completion of Unicode streams
 --CREDITS--
 Dave Kelsey d_kel...@uk.ibm.com
 --FILE--
@@ -12,26 +10,23 @@
  * Alias to functions: 
  */
 
-echo *** Testing file_put_contents() : variation ***\n;
 
 require_once('fopen_include_path.inc');
 
-// this doesn't create the include dirs in this directory
-// we change to this to ensure we are not part of the
-// include paths.
-$thisTestDir = filePutContentsVar4.dir;
+$thisTestDir = basename(__FILE__, .php) . .dir; 
 mkdir($thisTestDir);
 chdir($thisTestDir);
 
-$filename = afile.txt;
-$firstFile = $dir1./.$filename;
+$filename = basename(__FILE__, .php) . .tmp;
 
 $newpath = create_include_path();
 set_include_path($newpath);
 runtest();
+
 $newpath = generate_next_path();
 set_include_path($newpath);
 runtest();
+
 teardown_include_path();
 restore_include_path();
 chdir(..);
@@ -39,18 +34,18 @@
 
 
 function runtest() {
-   global $firstFile, $filename;
-   file_put_contents($filename, File in include path, FILE_USE_INCLUDE_PATH);
-   $line = file_get_contents($firstFile);
+   global $filename;
+   //correct php53 behaviour is to ingnore the FILE_USE_INCLUDE_PATH unless 
the file alread exists 
+   // in the include path. In this case it doesn't so the file should be 
written in the current dir.
+   file_put_contents($filename, (binary) File in include path, 
FILE_USE_INCLUDE_PATH);
+   $line = file_get_contents($filename);
echo $line\n;
-   unlink($firstFile);
unlink($filename);
 }
 
 ?
 ===DONE===
 --EXPECT--
-*** Testing file_put_contents() : variation ***
 File in include path
 File in include path
 ===DONE===



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/standard/tests/file file_put_contents_variation4.phpt file_put_contents_variation6.phpt

2008-12-03 Thread Johannes Schlüter
johannesWed Dec  3 11:27:11 2008 UTC

  Modified files:  
/php-src/ext/standard/tests/filefile_put_contents_variation4.phpt 
file_put_contents_variation6.phpt 
  Log:
  Cleanup after running the tests ...
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/file_put_contents_variation4.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/file/file_put_contents_variation4.phpt
diff -u php-src/ext/standard/tests/file/file_put_contents_variation4.phpt:1.2 
php-src/ext/standard/tests/file/file_put_contents_variation4.phpt:1.3
--- php-src/ext/standard/tests/file/file_put_contents_variation4.phpt:1.2   
Wed Nov 26 17:48:41 2008
+++ php-src/ext/standard/tests/file/file_put_contents_variation4.phpt   Wed Dec 
 3 11:27:11 2008
@@ -43,7 +43,8 @@
file_put_contents($filename, File in include path, FILE_USE_INCLUDE_PATH);
$line = file_get_contents($firstFile);
echo $line\n;
-   unlink($firstFile);  
+   unlink($firstFile);
+   unlink($filename);
 }
 
 ?
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/file_put_contents_variation6.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/file/file_put_contents_variation6.phpt
diff -u php-src/ext/standard/tests/file/file_put_contents_variation6.phpt:1.2 
php-src/ext/standard/tests/file/file_put_contents_variation6.phpt:1.3
--- php-src/ext/standard/tests/file/file_put_contents_variation6.phpt:1.2   
Wed Nov 26 17:48:41 2008
+++ php-src/ext/standard/tests/file/file_put_contents_variation6.phpt   Wed Dec 
 3 11:27:11 2008
@@ -44,7 +44,8 @@
file_put_contents($filename, . This was appended, FILE_USE_INCLUDE_PATH | 
FILE_APPEND);  
$line = file_get_contents($firstFile);
echo $line\n;
-   unlink($firstFile);  
+   unlink($firstFile); 
+   unlink($filename); 
 }
 
 ?



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php