tony2001                Fri Jan  9 23:12:30 2009 UTC

  Modified files:              
    /php-src/ext/ftp/tests      ftp_get_basic.phpt 
  Log:
  MF52: 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&r2=1.2&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 
php-src/ext/ftp/tests/ftp_get_basic.phpt:1.2
--- php-src/ext/ftp/tests/ftp_get_basic.phpt:1.1        Wed Dec 17 12:34:49 2008
+++ php-src/ext/ftp/tests/ftp_get_basic.phpt    Fri Jan  9 23:12:30 2009
@@ -18,12 +18,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