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

Bug #16179 TestSuite not run with php <file> command
Submitted: 2009-05-05 01:41 UTC
From: farell Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.2.0RC1)
PHP Version: 5.2.9 OS:
Roadmaps: (Not assigned)    
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 : 17 - 6 = ?

 
 [2009-05-05 01:41 UTC] farell (Laurent Laville)
Description: ------------ Hello Greg, Even if it's not a bug to PHP CS core but on PHPUnit Test Suite, I'd like you fix it, because I've pick your package as example on my future proposal named "PEAR_TestListener". With PHPUnit you can run test suite in two ways: - phpunit <classname> <filename> - php <filename> With RC1, you can only run your test suite following the first syntax. To have ability to run the second syntax, you have just to add at bottom of your AllTests.php file three lines as below if (PHPUnit_MAIN_METHOD == 'PHP_CodeSniffer_AllTests::main') { PHP_CodeSniffer_AllTests::main(); } Test script: --------------- php <path to>/PHP_CodeSniffer/AllTests.php Expected result: ---------------- PHPUnit 3.3.16 by Sebastian Bergmann. ............................................................ 60 / 169 ...................................................SS....... 120 / 169 ..............................................S.. Time: 0 seconds OK, but incomplete or skipped tests! Tests: 169, Assertions: 33, Skipped: 3. Actual result: -------------- No output

Comments

 [2009-05-05 12:37 UTC] squiz (Greg Sherwood)
-Status: Open +Status: Closed -Assigned To: +Assigned To: squiz
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. Too easy. Thanks for supplying the lines I needed.