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

ID: 17878
Updated by: gsherwood@squiz.net
Reported By: public at arachnidae dot com
Summary: config file not loaded properly during unit testing
Status: Open
-Type: Bug
+Type: Feature/Change Request
Package: PHP_CodeSniffer
Operating System: osx 10.6
Package Version: 1.3.0RC1
PHP Version: 5.3.2
-Assigned To:
+Assigned To: squiz
Roadmap Versions:
New Comment:

-Type: Bug
+Type: Feature/Change Request
-Assigned To:
+Assigned To: squiz
The unit testing system has absolutely no support for setting command
line values, especially those that affect the parsing of files.

I'll leave this as a feature request, although I don't know how
achievable it is given the fact that every sniff may want different
settings during testing and it has to run from an SVN checkout as well.

Previous Comments:

[2010-09-21 05:27:07] paladin

BTW, this bug also affects 1.2.2

Created a custom controlstructure sniff based on tab_width=4
in config file. Runs fine from cmd
line, unit tests fail.

when the line:


is placed in the sniff, it echoes the tab_width setting when run
from the command line, and
issues the exception "An unexpected exception has been
caught: Undefined index:
PHP_CODESNIFFER_CONFIG_DATA" when run in unit testing
with the command:

phpunit tests/AllTests.php


Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
postedSep 21, '10 at 6:35a
activeSep 21, '10 at 6:35a

1 user in discussion

Gsherwood: 1 post



site design / logo © 2022 Grokbase