Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.4.1

Bug #13850 inclusion of Net/FTP.php in tests doesn't always work
Submitted: 2008-05-08 09:54 UTC
From: cweiske Assigned: jorrit
Status: Closed Package: Net_FTP (version CVS)
PHP Version: 5.2.6 OS:
Roadmaps: 1.4.0a2, 1.3.7    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 27 - 11 = ?

 
 [2008-05-08 09:54 UTC] cweiske (Christian Weiske)
Description: ------------ The unit tests try to include ./Net/FTP.php which only works when the current working directory is the cvs dir. The suite should issue a chdir(dirname(__FILE__)) or something, so that it works with a different working directory. (seen in pear qa testsuite)

Comments

 [2008-05-08 10:03 UTC] jorrit (Jorrit Schippers)
What command do you use to invoke the unit test? When you use the pear command (as described in the document comment) the chdir is done for you.
 [2008-05-08 10:17 UTC] cweiske (Christian Weiske)
cweiske:~/Dev/cvs/pear/pear> php Net_FTP/tests/AllTests.php Warning: include_once(../Net/FTP.php): failed to open stream: Datei oder Verzeichnis nicht gefunden in /home/cweiske/Dev/cvs/pear/pear/Net_FTP/tests/Net_FTPTest.php on line 41 Call Stack: 0,0005 159656 1. {main}() /home/cweiske/Dev/cvs/pear/pear/Net_FTP/tests/AllTests.php:0 0,1531 8654976 2. require_once('/home/cweiske/Dev/cvs/pear/pear/Net_FTP/tests/Net_FTPTest.php') /home/cweiske/Dev/cvs/pear/pear/Net_FTP/tests/AllTests.php:39 Warning: include_once(): Failed opening '../Net/FTP.php' for inclusion (include_path='.:/home/cweiske/Dev/cvs/instpear') in /home/cweiske/Dev/cvs/pear/pear/Net_FTP/tests/Net_FTPTest.php on line 41 Call Stack: 0,0005 159656 1. {main}() /home/cweiske/Dev/cvs/pear/pear/Net_FTP/tests/AllTests.php:0 0,1531 8654976 2. require_once('/home/cweiske/Dev/cvs/pear/pear/Net_FTP/tests/Net_FTPTest.php') /home/cweiske/Dev/cvs/pear/pear/Net_FTP/tests/AllTests.php:39 PHPUnit 3.2.19 by Sebastian Bergmann.
 [2008-05-08 10:21 UTC] jorrit (Jorrit Schippers)
Does pear run-tests -ru work?
 [2008-05-19 18:08 UTC] jorrit (Jorrit Schippers)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.