FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=17902&edit=1

ID: 17902
Updated by: matthew@sigswitch.com
Reported By: matthew at sigswitch dot com
Summary: Cannot run tests when tests are symlinked into tests
dir
Status: Open
Type: Bug
Package: PHP_CodeSniffer
-Operating System: Ubuntu
+Operating System: Ubuntu 10.04
Package Version: 1.2.2
PHP Version: 5.3.2
Roadmap Versions:
New Comment:

-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


Previous Comments:
------------------------------------------------------------------------

[2010-09-28 15:28:48] brmatt

Added #patch
bug:17902;patch:fix-cant-run-symlinked-tests.patch;revision:1285687728;.

------------------------------------------------------------------------

[2010-09-28 15:24:17] brmatt

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

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedSep 28, '10 at 3:31p
activeSep 28, '10 at 3:31p
posts1
users1
websitepear.php.net

1 user in discussion

Matthew: 1 post

People

Translate

site design / logo © 2022 Grokbase