FAQ
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: Assigned
+Status: Open
Type: Feature/Change Request
Package: PHP_CodeSniffer
Operating System: osx 10.6
Package Version: 1.3.0RC1
PHP Version: 5.3.2
Assigned To: squiz
Roadmap Versions:
New Comment:

-Status: Assigned
+Status: Open



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

[2010-09-21 06:34:57] squiz

-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.

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

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

Description:
------------
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:

echo
print_r($GLOBALS['PHP_CODESNIFFER_CONFIG_DATA'],1);

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

  • Gsherwood at Apr 7, 2011 at 6:54 am
    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: Assigned
    +Status: Open
    Type: Feature/Change Request
    Package: PHP_CodeSniffer
    Operating System: osx 10.6
    Package Version: 1.3.0RC1
    PHP Version: 5.3.2
    Assigned To: squiz
    Roadmap Versions:
    New Comment:

    -Status: Assigned
    +Status: Open



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

    [2011-04-07 07:56:03] squiz

    -Status: Assigned
    +Status: Open


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

    [2010-09-21 06:34:57] squiz

    -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.

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

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

    Description:
    ------------
    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:

    echo
    print_r($GLOBALS['PHP_CODESNIFFER_CONFIG_DATA'],1);

    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

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedApr 7, '11 at 6:54a
activeApr 7, '11 at 6:54a
posts2
users1
websitepear.php.net

1 user in discussion

Gsherwood: 2 posts

People

Translate

site design / logo © 2022 Grokbase