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

Request #14817 Use markTestSkipped, not fail()
Submitted: 2008-10-18 03:31 UTC
From: doconnor Assigned: doconnor
Status: Closed Package: Net_FTP (version CVS)
PHP Version: 5.2.6 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2008-10-18 03:31 UTC] doconnor (Daniel O'Connor)
Description: ------------ PHPUnit lets you mark a test skipped if it is not possible to run it.

Comments

 [2008-10-18 09:32 UTC] jorrit (Jorrit Schippers)
The problem with markTestSkipped is that by default it doesn't show the reason, and pear run-tests doesn't have an option to toggle the --verbose option of phpUnit, so the user can never see the reason of the skipped test. If you have a solution for this or think this reason is invalid, please let me know.
 [2008-10-18 10:19 UTC] doconnor (Daniel O'Connor)
Ooh, pear run-tests doesn't? That shouldn't be overly tricky to improve on, as phpunit models skipped and incomplete tests as exceptions: these can undoubtedly be rendered out in some way. I'll put in a feature request and maybe churn out a patch. The way I'm used to running tests is generally via the phpunit command line tool rather than pear run tests; so this didn't occur to me.
 [2008-10-18 10:43 UTC] jorrit (Jorrit Schippers)
From the PEAR-DEV mailinglist I see that you intend to run a PEAR-wide unit test. Is your intention to create a config for the Net_FTP unit tests or is it your objective to not make any modifications and have the test complete for all tests?
 [2008-10-18 10:48 UTC] doconnor (Daniel O'Connor)
Ideal world: continuous integration environment. Basic assumptions: 1) The CI environment can checkout from CVS and run all tests regularly, notifying people when tests fail 2) If certain tests cannot run in the current environment (ie, they need hand configuration); they should mark themselves skipped and explain why 3) Over time, people try to reduce the number of skipped tests as much as possible - in your case, setting up the server needed or implementing dummy objects which give canned responses.
 [2011-03-24 06:22 UTC] till (Till Klampaeckel)
-Status: Analyzed +Status: Closed -Assigned To: +Assigned To: doconnor
This bug has been fixed in SVN. 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. Closing this. Patch is applied. If pear run-tests needs something, open an issue there.