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

Bug #19061 Tests don't work with PHPUnit 3.6
Submitted: 2011-11-20 15:16 UTC
From: kukulich Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version SVN)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


 [2011-11-20 15:16 UTC] kukulich (Jaroslav Hanslík)
Description: ------------ It only looks as it does tests but in fact it doesn't test anything.

Comments

 [2011-11-21 03:03 UTC] doconnor (Daniel O'Connor)
 [2011-11-21 03:03 UTC] doconnor (Daniel O'Connor)
-Status: Open +Status: Feedback
 [2011-11-21 03:21 UTC] kukulich (Jaroslav Hanslík)
-Operating System: +Operating System: Windows
I'm sorry, I switched to wrong branch on my clone. The problem should be fixed with my pull request https://github.com/squizlabs/PHP_CodeSniffer/pull/3 However it's strange that I see 2 results. It looks that it runs the tests twice on Windows: p:\Git\php-codesniffer>phpunit tests\AllTests.php PHPUnit 3.6.3 by Sebastian Bergmann. ............................................................... 63 / 209 ( 30%) ............................................................... 126 / 209 ( 60%) .........................SS.................................... 189 / 209 ( 90%) .................S.. Time: 32 seconds, Memory: 25.75Mb OK, but incomplete or skipped tests! Tests: 209, Assertions: 150, Skipped: 3. PHPUnit 3.6.3 by Sebastian Bergmann. ............................................................... 63 / 209 ( 30%) ............................................................... 126 / 209 ( 60%) .........................SS.................................... 189 / 209 ( 90%) .................S.. Time: 01:04, Memory: 28.00Mb OK, but incomplete or skipped tests! Tests: 209, Assertions: 150, Skipped: 3.
 [2011-11-21 03:27 UTC] squiz (Greg Sherwood)
-Assigned To: +Assigned To: squiz
Testing with PHPUnit 3.6.3, it certainly does test the files (I can generate failures pretty easily) but it also runs the whole test suite twice and generates the error list twice. That's not ideal and I'll have to look into it. Although I still don't understand the original report. How do you know the tests aren't testing anything?
 [2011-11-21 03:29 UTC] squiz (Greg Sherwood)
Missed your reply by a few mins :) Thanks for the follow-up.
 [2011-11-21 08:55 UTC] squiz (Greg Sherwood)
-Status: Feedback +Status: Closed
I pushed out a change to the AllTests.php file to stop it running twice. This means it will, presumable, not work with PHPUnit < 3.6, but I dont have another install to try it and I'm not too fussed. As long as it works on the latest.