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

Bug #17902 Cannot run tests when tests are symlinked into tests dir
Submitted: 2010-09-28 19:24 UTC
From: brmatt Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.2.2)
PHP Version: 5.3.2 OS: Ubuntu 10.04
Roadmaps: (Not assigned)    
Subscription  


 [2010-09-28 19:24 UTC] brmatt (Matt Button)
Description: ------------ If you symlink a standard and its tests into the codesniffer dirs then AllSniffs.php tries to load a non-existant class which is the absolute path to the symlinked sniff, delimited by underscores. Test script: --------------- symlink a tests directory into /usr/share/php/test/PHP_CodeSniffer/CodeSniffer/Standards/{standard name} i.e. ln -sfn ~/www/standard /usr/share/php/test/PHP_CodeSniffer/CodeSniffer/Standards/MyStandard phpunit --bootstrap=/usr/share/php/PHP/CodeSniffer.php /usr/share/php/test/PHP_CodeSniffer/CodeSniffer/Standards/AllSniffs.php Expected result: ---------------- All tests run Actual result: -------------- PHP Fatal error: Class '_home_matt_www_standards_test_PHP_CodeSniffer_CodeSniffe r_Standards_Standard_Tests_NamingConventions_ValidFunction NameUnitTest' not found in /usr/share/php/test/PHP_CodeSniffer/CodeSniffer/Standards/AllS niffs.php on line 122

Comments

 [2010-09-28 19:28 UTC] brmatt (Matt Button)
 [2010-09-28 19:31 UTC] brmatt (Matt Button)
-Operating System: Ubuntu +Operating System: Ubuntu 10.04
Fixing text wrapping in error: PHP Fatal error: Class '_home_matt_www_standards_test_PHP_CodeSniffer_CodeSniffer_Standards_Standar d_Tests_NamingConventions_ValidFunctionNameUnitTest' not found in /usr/share/php/test/PHP_CodeSniffer/CodeSniffer/Standards/AllSniffs.php on line 122
 [2010-10-08 05:50 UTC] squiz (Greg Sherwood)
-Status: Open +Status: Closed -Assigned To: +Assigned To: squiz
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. Thanks for the patch. I made a few more changes as I think your new code also works well for the case when it is not installed.