tony2001                Fri Jan  9 23:11:53 2009 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/ftp/tests      ftp_get_basic.phpt 
  Log:
  fix test: don't create tmp files in "." and clean up when done
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/ftp/tests/ftp_get_basic.phpt?r1=1.1.4.2&r2=1.1.4.3&diff_format=u
Index: php-src/ext/ftp/tests/ftp_get_basic.phpt
diff -u php-src/ext/ftp/tests/ftp_get_basic.phpt:1.1.4.2 
php-src/ext/ftp/tests/ftp_get_basic.phpt:1.1.4.3
--- php-src/ext/ftp/tests/ftp_get_basic.phpt:1.1.4.2    Wed Dec 17 12:35:53 2008
+++ php-src/ext/ftp/tests/ftp_get_basic.phpt    Fri Jan  9 23:11:52 2009
@@ -1,7 +1,7 @@
 --TEST--
-FTP ftp_get file for both binary and ASCII transfer modes
+FTP ftp_get file for both binary and ASCII transfer modes 
 --CREDITS--
-Nathaniel McHugh 
+Nathaniel McHugh
 --SKIPIF--
 <?php
 require 'skipif.inc';
@@ -16,12 +16,13 @@
 var_dump(ftp_login($ftp, 'user', 'pass'));
 
 //test simple text transfer
-$tmpfname = tempnam(".", "ftp_test");
+$tmpfname = tempnam(dirname(__FILE__), "ftp_test");
 var_dump(ftp_get($ftp, $tmpfname ,'a story.txt', FTP_ASCII));
 echo file_get_contents($tmpfname);
+unlink($tmpfname);
 
 //test binary data transfer
-$tmpfname = tempnam(".", "ftp_test");
+$tmpfname = tempnam(dirname(__FILE__), "ftp_test");
 var_dump(ftp_get($ftp, $tmpfname, 'binary data.bin', FTP_BINARY));
 var_dump(urlencode(file_get_contents($tmpfname)));
 unlink($tmpfname);



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

Reply via email to