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

ID: 17699
Updated by: daniel.oconnor@gmail.com
Reported By: blueduck at gmx dot net
Summary: Fatal error: Uncaught exception 'ReflectionException'
Status: Open
Type: Bug
Package: PHP_CodeSniffer
Operating System: OSX 10.6
Package Version: 1.3.0a1
PHP Version: 5.3.2
Roadmap Versions:
New Comment:

Against SVN, there's another fatal error:

PHP Fatal error: Call to a member function getFilename() on a
non-object in
/home/clockwerx/pear/PHP_CodeSniffer/trunk/tests/Standards/AbstractSniffUnitTest.php
on line 178


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

[2010-08-13 10:38:10] konafets

Description:
------------
I want create a coverage report with phpunit execute this command:


Test script:
---------------
phpunit --coverage-clover=results/PHPUnit/Clover/clover.xml --verbose
/PHP_CodeSniffer/tests/AllTests.php

Expected result:
----------------
All tests running without any problems and I get the coverage report.

Actual result:
--------------
Fatal error: Uncaught exception 'ReflectionException' with message
'Method
MySource_Tests_Channels_DisallowSelfActionsUnitTest::DisallowSelfActions()
does not exist' in /usr/lib/php/PHP/CodeCoverage/Util.php:218
Stack trace:
#0 /usr/lib/php/PHP/CodeCoverage/Util.php(218):
ReflectionMethod->__construct('MySource_Tests_...',
'DisallowSelfAct...')
#1 /usr/lib/php/PHP/CodeCoverage.php(502):
PHP_CodeCoverage_Util::getLinesToBeCovered('MySource_Tests_...',
'DisallowSelfAct...')
#2 /usr/lib/php/PHP/CodeCoverage.php(236):
PHP_CodeCoverage->applyCoversAnnotationFilter(Array,
Object(MySource_Tests_Channels_DisallowSelfActionsUnitTest))
#3 /usr/lib/php/PHPUnit/Framework/TestResult.php(642):
PHP_CodeCoverage->append(Array,
Object(MySource_Tests_Channels_DisallowSelfActionsUnitTest), Array)
#4 /usr/lib/php/PHPUnit/Framework/TestCase.php(599):
PHPUnit_Framework_TestResult->run(Object(MySource_Tests_Channels_DisallowSelfActionsUnitTest))
#5 /usr/lib/php/PHPUnit/Framework/TestSuite.php(751):
PHPUnit_Framework_TestCase->run(Object(PHPUnit in
/usr/lib/php/PHP/CodeCoverage/Util.php on line 218

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

Search Discussions

  • Daniel Oconnor at Aug 14, 2010 at 2:15 am
    Edit report at http://pear.php.net/bugs/bug.php?id=17699&edit=1

    ID: 17699
    Updated by: daniel.oconnor@gmail.com
    Reported By: blueduck at gmx dot net
    Summary: Fatal error: Uncaught exception 'ReflectionException'
    Status: Open
    Type: Bug
    Package: PHP_CodeSniffer
    Operating System: OSX 10.6
    Package Version: 1.3.0a1
    PHP Version: 5.3.2
    Roadmap Versions:
    New Comment:

    r302198


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

    [2010-08-14 02:11:06] doconnor

    Against SVN, there's another fatal error:

    PHP Fatal error: Call to a member function getFilename() on a
    non-object in
    /home/clockwerx/pear/PHP_CodeSniffer/trunk/tests/Standards/AbstractSniffUnitTest.php
    on line 178

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

    [2010-08-13 10:38:10] konafets

    Description:
    ------------
    I want create a coverage report with phpunit execute this command:


    Test script:
    ---------------
    phpunit --coverage-clover=results/PHPUnit/Clover/clover.xml --verbose
    /PHP_CodeSniffer/tests/AllTests.php

    Expected result:
    ----------------
    All tests running without any problems and I get the coverage report.

    Actual result:
    --------------
    Fatal error: Uncaught exception 'ReflectionException' with message
    'Method
    MySource_Tests_Channels_DisallowSelfActionsUnitTest::DisallowSelfActions()
    does not exist' in /usr/lib/php/PHP/CodeCoverage/Util.php:218
    Stack trace:
    #0 /usr/lib/php/PHP/CodeCoverage/Util.php(218):
    ReflectionMethod->__construct('MySource_Tests_...',
    'DisallowSelfAct...')
    #1 /usr/lib/php/PHP/CodeCoverage.php(502):
    PHP_CodeCoverage_Util::getLinesToBeCovered('MySource_Tests_...',
    'DisallowSelfAct...')
    #2 /usr/lib/php/PHP/CodeCoverage.php(236):
    PHP_CodeCoverage->applyCoversAnnotationFilter(Array,
    Object(MySource_Tests_Channels_DisallowSelfActionsUnitTest))
    #3 /usr/lib/php/PHPUnit/Framework/TestResult.php(642):
    PHP_CodeCoverage->append(Array,
    Object(MySource_Tests_Channels_DisallowSelfActionsUnitTest), Array)
    #4 /usr/lib/php/PHPUnit/Framework/TestCase.php(599):
    PHPUnit_Framework_TestResult->run(Object(MySource_Tests_Channels_DisallowSelfActionsUnitTest))
    #5 /usr/lib/php/PHPUnit/Framework/TestSuite.php(751):
    PHPUnit_Framework_TestCase->run(Object(PHPUnit in
    /usr/lib/php/PHP/CodeCoverage/Util.php on line 218

    ------------------------------------------------------------------------
  • Daniel Oconnor at Aug 14, 2010 at 2:17 am
    Edit report at http://pear.php.net/bugs/bug.php?id=17699&edit=1

    ID: 17699
    Updated by: daniel.oconnor@gmail.com
    Reported By: blueduck at gmx dot net
    Summary: Fatal error: Uncaught exception 'ReflectionException'
    Status: Open
    Type: Bug
    Package: PHP_CodeSniffer
    Operating System: OSX 10.6
    Package Version: 1.3.0a1
    PHP Version: 5.3.2
    Roadmap Versions:
    New Comment:

    Stefano, I believe this is resolved in current SVN - barring the other
    test failures which might be hiding it.


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

    [2010-08-14 02:15:15] doconnor

    r302198

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

    [2010-08-14 02:11:06] doconnor

    Against SVN, there's another fatal error:

    PHP Fatal error: Call to a member function getFilename() on a
    non-object in
    /home/clockwerx/pear/PHP_CodeSniffer/trunk/tests/Standards/AbstractSniffUnitTest.php
    on line 178

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

    [2010-08-13 10:38:10] konafets

    Description:
    ------------
    I want create a coverage report with phpunit execute this command:


    Test script:
    ---------------
    phpunit --coverage-clover=results/PHPUnit/Clover/clover.xml --verbose
    /PHP_CodeSniffer/tests/AllTests.php

    Expected result:
    ----------------
    All tests running without any problems and I get the coverage report.

    Actual result:
    --------------
    Fatal error: Uncaught exception 'ReflectionException' with message
    'Method
    MySource_Tests_Channels_DisallowSelfActionsUnitTest::DisallowSelfActions()
    does not exist' in /usr/lib/php/PHP/CodeCoverage/Util.php:218
    Stack trace:
    #0 /usr/lib/php/PHP/CodeCoverage/Util.php(218):
    ReflectionMethod->__construct('MySource_Tests_...',
    'DisallowSelfAct...')
    #1 /usr/lib/php/PHP/CodeCoverage.php(502):
    PHP_CodeCoverage_Util::getLinesToBeCovered('MySource_Tests_...',
    'DisallowSelfAct...')
    #2 /usr/lib/php/PHP/CodeCoverage.php(236):
    PHP_CodeCoverage->applyCoversAnnotationFilter(Array,
    Object(MySource_Tests_Channels_DisallowSelfActionsUnitTest))
    #3 /usr/lib/php/PHPUnit/Framework/TestResult.php(642):
    PHP_CodeCoverage->append(Array,
    Object(MySource_Tests_Channels_DisallowSelfActionsUnitTest), Array)
    #4 /usr/lib/php/PHPUnit/Framework/TestCase.php(599):
    PHPUnit_Framework_TestResult->run(Object(MySource_Tests_Channels_DisallowSelfActionsUnitTest))
    #5 /usr/lib/php/PHPUnit/Framework/TestSuite.php(751):
    PHPUnit_Framework_TestCase->run(Object(PHPUnit in
    /usr/lib/php/PHP/CodeCoverage/Util.php on line 218

    ------------------------------------------------------------------------
  • Daniel Oconnor at Aug 14, 2010 at 2:17 am
    Edit report at http://pear.php.net/bugs/bug.php?id=17699&edit=1

    ID: 17699
    Updated by: daniel.oconnor@gmail.com
    Reported By: blueduck at gmx dot net
    Summary: Fatal error: Uncaught exception 'ReflectionException'
    Status: Open
    Type: Bug
    Package: PHP_CodeSniffer
    Operating System: OSX 10.6
    Package Version: 1.3.0a1
    PHP Version: 5.3.2
    -Assigned To:
    +Assigned To: squiz
    Roadmap Versions:
    New Comment:

    -Assigned To:
    +Assigned To: squiz



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

    [2010-08-14 02:17:03] doconnor

    Stefano, I believe this is resolved in current SVN - barring the other
    test failures which might be hiding it.

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

    [2010-08-14 02:15:15] doconnor

    r302198

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

    [2010-08-14 02:11:06] doconnor

    Against SVN, there's another fatal error:

    PHP Fatal error: Call to a member function getFilename() on a
    non-object in
    /home/clockwerx/pear/PHP_CodeSniffer/trunk/tests/Standards/AbstractSniffUnitTest.php
    on line 178

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

    [2010-08-13 10:38:10] konafets

    Description:
    ------------
    I want create a coverage report with phpunit execute this command:


    Test script:
    ---------------
    phpunit --coverage-clover=results/PHPUnit/Clover/clover.xml --verbose
    /PHP_CodeSniffer/tests/AllTests.php

    Expected result:
    ----------------
    All tests running without any problems and I get the coverage report.

    Actual result:
    --------------
    Fatal error: Uncaught exception 'ReflectionException' with message
    'Method
    MySource_Tests_Channels_DisallowSelfActionsUnitTest::DisallowSelfActions()
    does not exist' in /usr/lib/php/PHP/CodeCoverage/Util.php:218
    Stack trace:
    #0 /usr/lib/php/PHP/CodeCoverage/Util.php(218):
    ReflectionMethod->__construct('MySource_Tests_...',
    'DisallowSelfAct...')
    #1 /usr/lib/php/PHP/CodeCoverage.php(502):
    PHP_CodeCoverage_Util::getLinesToBeCovered('MySource_Tests_...',
    'DisallowSelfAct...')
    #2 /usr/lib/php/PHP/CodeCoverage.php(236):
    PHP_CodeCoverage->applyCoversAnnotationFilter(Array,
    Object(MySource_Tests_Channels_DisallowSelfActionsUnitTest))
    #3 /usr/lib/php/PHPUnit/Framework/TestResult.php(642):
    PHP_CodeCoverage->append(Array,
    Object(MySource_Tests_Channels_DisallowSelfActionsUnitTest), Array)
    #4 /usr/lib/php/PHPUnit/Framework/TestCase.php(599):
    PHPUnit_Framework_TestResult->run(Object(MySource_Tests_Channels_DisallowSelfActionsUnitTest))
    #5 /usr/lib/php/PHPUnit/Framework/TestSuite.php(751):
    PHPUnit_Framework_TestCase->run(Object(PHPUnit in
    /usr/lib/php/PHP/CodeCoverage/Util.php on line 218

    ------------------------------------------------------------------------
  • Blueduck at Aug 14, 2010 at 11:51 am
    Edit report at http://pear.php.net/bugs/bug.php?id=17699&edit=1

    ID: 17699
    Updated by: blueduck@gmx.net
    Reported By: blueduck at gmx dot net
    Summary: Fatal error: Uncaught exception 'ReflectionException'
    Status: Assigned
    Type: Bug
    Package: PHP_CodeSniffer
    Operating System: OSX 10.6
    Package Version: 1.3.0a1
    PHP Version: 5.3.2
    Assigned To: squiz
    Roadmap Versions:
    New Comment:

    Ok, i can confirm the error "PHP Fatal error: Call to a member function
    getFilename() on a non-object in
    /home/clockwerx/pear/PHP_CodeSniffer/trunk/tests/Standards/AbstractSniffUnitTest.php
    on line 178" against the current trunk. This doesn't occur with the
    latest alpha.

    But the origin fatal error is still there.


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

    [2010-08-14 02:17:25] doconnor

    -Assigned To:
    +Assigned To: squiz


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

    [2010-08-14 02:17:03] doconnor

    Stefano, I believe this is resolved in current SVN - barring the other
    test failures which might be hiding it.

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

    [2010-08-14 02:15:15] doconnor

    r302198

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

    [2010-08-14 02:11:06] doconnor

    Against SVN, there's another fatal error:

    PHP Fatal error: Call to a member function getFilename() on a
    non-object in
    /home/clockwerx/pear/PHP_CodeSniffer/trunk/tests/Standards/AbstractSniffUnitTest.php
    on line 178

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

    [2010-08-13 10:38:10] konafets

    Description:
    ------------
    I want create a coverage report with phpunit execute this command:


    Test script:
    ---------------
    phpunit --coverage-clover=results/PHPUnit/Clover/clover.xml --verbose
    /PHP_CodeSniffer/tests/AllTests.php

    Expected result:
    ----------------
    All tests running without any problems and I get the coverage report.

    Actual result:
    --------------
    Fatal error: Uncaught exception 'ReflectionException' with message
    'Method
    MySource_Tests_Channels_DisallowSelfActionsUnitTest::DisallowSelfActions()
    does not exist' in /usr/lib/php/PHP/CodeCoverage/Util.php:218
    Stack trace:
    #0 /usr/lib/php/PHP/CodeCoverage/Util.php(218):
    ReflectionMethod->__construct('MySource_Tests_...',
    'DisallowSelfAct...')
    #1 /usr/lib/php/PHP/CodeCoverage.php(502):
    PHP_CodeCoverage_Util::getLinesToBeCovered('MySource_Tests_...',
    'DisallowSelfAct...')
    #2 /usr/lib/php/PHP/CodeCoverage.php(236):
    PHP_CodeCoverage->applyCoversAnnotationFilter(Array,
    Object(MySource_Tests_Channels_DisallowSelfActionsUnitTest))
    #3 /usr/lib/php/PHPUnit/Framework/TestResult.php(642):
    PHP_CodeCoverage->append(Array,
    Object(MySource_Tests_Channels_DisallowSelfActionsUnitTest), Array)
    #4 /usr/lib/php/PHPUnit/Framework/TestCase.php(599):
    PHPUnit_Framework_TestResult->run(Object(MySource_Tests_Channels_DisallowSelfActionsUnitTest))
    #5 /usr/lib/php/PHPUnit/Framework/TestSuite.php(751):
    PHPUnit_Framework_TestCase->run(Object(PHPUnit in
    /usr/lib/php/PHP/CodeCoverage/Util.php on line 218

    ------------------------------------------------------------------------
  • Blueduck at Aug 14, 2010 at 11:54 am
    Edit report at http://pear.php.net/bugs/bug.php?id=17699&edit=1

    ID: 17699
    Updated by: blueduck@gmx.net
    Reported By: blueduck at gmx dot net
    Summary: Fatal error: Uncaught exception 'ReflectionException'
    Status: Assigned
    Type: Bug
    Package: PHP_CodeSniffer
    Operating System: OSX 10.6
    Package Version: 1.3.0a1
    PHP Version: 5.3.2
    Assigned To: squiz
    Roadmap Versions:
    New Comment:

    I expressed me incorrect: I can reproduce the error you mentioned with
    the current trunk when I removed the type hint. With the type hint this
    error is fixed, but my issue is still there.


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

    [2010-08-14 11:51:33] konafets

    Ok, i can confirm the error "PHP Fatal error: Call to a member function
    getFilename() on a non-object in
    /home/clockwerx/pear/PHP_CodeSniffer/trunk/tests/Standards/AbstractSniffUnitTest.php
    on line 178" against the current trunk. This doesn't occur with the
    latest alpha.

    But the origin fatal error is still there.

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

    [2010-08-14 02:17:25] doconnor

    -Assigned To:
    +Assigned To: squiz


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

    [2010-08-14 02:17:03] doconnor

    Stefano, I believe this is resolved in current SVN - barring the other
    test failures which might be hiding it.

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

    [2010-08-14 02:15:15] doconnor

    r302198

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

    [2010-08-14 02:11:06] doconnor

    Against SVN, there's another fatal error:

    PHP Fatal error: Call to a member function getFilename() on a
    non-object in
    /home/clockwerx/pear/PHP_CodeSniffer/trunk/tests/Standards/AbstractSniffUnitTest.php
    on line 178

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

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=17699
  • Gsherwood at Aug 16, 2010 at 1:17 am
    Edit report at http://pear.php.net/bugs/bug.php?id=17699&edit=1

    ID: 17699
    Updated by: gsherwood@squiz.net
    Reported By: blueduck at gmx dot net
    Summary: Fatal error: Uncaught exception 'ReflectionException'
    -Status: Assigned
    +Status: Closed
    Type: Bug
    Package: PHP_CodeSniffer
    Operating System: OSX 10.6
    Package Version: 1.3.0a1
    PHP Version: 5.3.2
    Assigned To: squiz
    Roadmap Versions:
    New Comment:

    -Status: Assigned
    +Status: Closed
    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.

    Was actually a problem in SVN only, and caused by new feature to allow
    standards to contain ignore patterns. Refactored the way the custom
    testing system checks sniffs and added the generic sniffs back into the
    test list. All working now.


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

    [2010-08-14 11:54:50] konafets

    I expressed me incorrect: I can reproduce the error you mentioned with
    the current trunk when I removed the type hint. With the type hint this
    error is fixed, but my issue is still there.

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

    [2010-08-14 11:51:33] konafets

    Ok, i can confirm the error "PHP Fatal error: Call to a member function
    getFilename() on a non-object in
    /home/clockwerx/pear/PHP_CodeSniffer/trunk/tests/Standards/AbstractSniffUnitTest.php
    on line 178" against the current trunk. This doesn't occur with the
    latest alpha.

    But the origin fatal error is still there.

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

    [2010-08-14 02:17:25] doconnor

    -Assigned To:
    +Assigned To: squiz


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

    [2010-08-14 02:17:03] doconnor

    Stefano, I believe this is resolved in current SVN - barring the other
    test failures which might be hiding it.

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

    [2010-08-14 02:15:15] doconnor

    r302198

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

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=17699
  • Blueduck at Aug 16, 2010 at 10:24 pm
    Edit report at http://pear.php.net/bugs/bug.php?id=17699&edit=1

    ID: 17699
    Updated by: blueduck@gmx.net
    Reported By: blueduck at gmx dot net
    Summary: Fatal error: Uncaught exception 'ReflectionException'
    Status: Closed
    Type: Bug
    Package: PHP_CodeSniffer
    Operating System: OSX 10.6
    Package Version: 1.3.0a1
    PHP Version: 5.3.2
    Assigned To: squiz
    Roadmap Versions:
    New Comment:

    With which version of PHPUnit this works for you?
    I had update my working directory to latest trunk, but the error is
    still there.

    I tried this with PHPUnit 3.4.0 and PHPUnit 3.5.0RC1.


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

    [2010-08-16 01:17:34] squiz

    -Status: Assigned
    +Status: Closed
    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.

    Was actually a problem in SVN only, and caused by new feature to allow
    standards to contain ignore patterns. Refactored the way the custom
    testing system checks sniffs and added the generic sniffs back into the
    test list. All working now.

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

    [2010-08-14 11:54:50] konafets

    I expressed me incorrect: I can reproduce the error you mentioned with
    the current trunk when I removed the type hint. With the type hint this
    error is fixed, but my issue is still there.

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

    [2010-08-14 11:51:33] konafets

    Ok, i can confirm the error "PHP Fatal error: Call to a member function
    getFilename() on a non-object in
    /home/clockwerx/pear/PHP_CodeSniffer/trunk/tests/Standards/AbstractSniffUnitTest.php
    on line 178" against the current trunk. This doesn't occur with the
    latest alpha.

    But the origin fatal error is still there.

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

    [2010-08-14 02:17:25] doconnor

    -Assigned To:
    +Assigned To: squiz


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

    [2010-08-14 02:17:03] doconnor

    Stefano, I believe this is resolved in current SVN - barring the other
    test failures which might be hiding it.

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

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=17699
  • Gsherwood at Aug 16, 2010 at 11:10 pm
    Edit report at http://pear.php.net/bugs/bug.php?id=17699&edit=1

    ID: 17699
    Updated by: gsherwood@squiz.net
    Reported By: blueduck at gmx dot net
    Summary: Fatal error: Uncaught exception 'ReflectionException'
    Status: Closed
    Type: Bug
    Package: PHP_CodeSniffer
    Operating System: OSX 10.6
    Package Version: 1.3.0a1
    PHP Version: 5.3.2
    Assigned To: squiz
    Roadmap Versions:
    New Comment:

    This is my output:

    94:trunk gsherwood$ phpunit tests/AllTests.php
    PHPUnit 3.4.10 by Sebastian Bergmann.

    ............................................................ 60 / 233
    ............................................................ 120 / 233
    ....................SS...................................... 180 / 233
    .................S...................................

    Time: 15 seconds, Memory: 33.00Mb

    OK, but incomplete or skipped tests!
    Tests: 233, Assertions: 138, Skipped: 3.


    I had a slightly older version, so I also updated to 3.4.15 (latest
    stable) and got exactly the same results.


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

    [2010-08-16 22:24:23] konafets

    With which version of PHPUnit this works for you?
    I had update my working directory to latest trunk, but the error is
    still there.

    I tried this with PHPUnit 3.4.0 and PHPUnit 3.5.0RC1.

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

    [2010-08-16 01:17:34] squiz

    -Status: Assigned
    +Status: Closed
    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.

    Was actually a problem in SVN only, and caused by new feature to allow
    standards to contain ignore patterns. Refactored the way the custom
    testing system checks sniffs and added the generic sniffs back into the
    test list. All working now.

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

    [2010-08-14 11:54:50] konafets

    I expressed me incorrect: I can reproduce the error you mentioned with
    the current trunk when I removed the type hint. With the type hint this
    error is fixed, but my issue is still there.

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

    [2010-08-14 11:51:33] konafets

    Ok, i can confirm the error "PHP Fatal error: Call to a member function
    getFilename() on a non-object in
    /home/clockwerx/pear/PHP_CodeSniffer/trunk/tests/Standards/AbstractSniffUnitTest.php
    on line 178" against the current trunk. This doesn't occur with the
    latest alpha.

    But the origin fatal error is still there.

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

    [2010-08-14 02:17:25] doconnor

    -Assigned To:
    +Assigned To: squiz


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

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=17699
  • Blueduck at Aug 17, 2010 at 7:44 am
    Edit report at http://pear.php.net/bugs/bug.php?id=17699&edit=1

    ID: 17699
    Comment by: blueduck@gmx.net
    Reported By: blueduck at gmx dot net
    Summary: Fatal error: Uncaught exception 'ReflectionException'
    Status: Closed
    Type: Bug
    Package: PHP_CodeSniffer
    Operating System: OSX 10.6
    Package Version: 1.3.0a1
    PHP Version: 5.3.2
    Assigned To: squiz
    Roadmap Versions:
    New Comment:

    Please try it with the --coverage-clover option:

    This is the output with PHPUnit 3.5.0RC1, but its the same with 3.4

    phpunit
    --coverage-clover=/Users/sok/Sites/projekte/hudson/jobs/CodeSnifferTYPO3/workspace/results/PHPUnit/Clover/clover.xml
    --verbose /Users/sok/Downloads/CodeSniffer/tests/AllTests.php

    Notice: Please no longer include "PHPUnit/Framework.php". in
    /usr/lib/php/PHPUnit/Framework.php on line 51
    PHPUnit 3.5.0RC1 by Sebastian Bergmann.

    PHP CodeSniffer
    PHP CodeSniffer Core
    Core_IsCamelCapsTest
    .......

    Core_ErrorSuppressionTest
    ....

    Core_ReportingTest
    ..

    Core_Reports_CheckstyleTest
    .

    Core_Reports_FullTest
    .

    Core_Reports_SummaryTest
    .

    Core_Reports_XmlTest
    .

    Core_Reports_CsvTest
    .

    Core_Reports_EmacsTest
    .

    Core_Reports_SourceTest
    .

    Core_Reports_SvnblameTest
    ..

    Core_Reports_GitblameTest
    .
    testGetGitAuthor
    .........

    PHP CodeSniffer Standards

    Fatal error: Uncaught exception 'ReflectionException' with message
    'Method
    Generic_Tests_Classes_DuplicateClassNameUnitTest::DuplicateClassName()
    does not exist' in /usr/lib/php/PHP/CodeCoverage/Util.php:218
    Stack trace:
    #0 /usr/lib/php/PHP/CodeCoverage/Util.php(218):
    ReflectionMethod->__construct('Generic_Tests_C...',
    'DuplicateClassN...')
    #1 /usr/lib/php/PHP/CodeCoverage.php(502):
    PHP_CodeCoverage_Util::getLinesToBeCovered('Generic_Tests_C...',
    'DuplicateClassN...')
    #2 /usr/lib/php/PHP/CodeCoverage.php(236):
    PHP_CodeCoverage->applyCoversAnnotationFilter(Array,
    Object(Generic_Tests_Classes_DuplicateClassNameUnitTest))
    #3 /usr/lib/php/PHPUnit/Framework/TestResult.php(642):
    PHP_CodeCoverage->append(Array,
    Object(Generic_Tests_Classes_DuplicateClassNameUnitTest), Array)
    #4 /usr/lib/php/PHPUnit/Framework/TestCase.php(599):
    PHPUnit_Framework_TestResult->run(Object(Generic_Tests_Classes_DuplicateClassNameUnitTest))
    #5 /usr/lib/php/PHPUnit/Framework/TestSuite.php(751):
    PHPUnit_Framework_TestCase->run(Object(PHPUnit_Framework_Te in
    /usr/lib/php/PHP/CodeCoverage/Util.php on line 218


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

    [2010-08-16 23:10:40] squiz

    This is my output:

    94:trunk gsherwood$ phpunit tests/AllTests.php
    PHPUnit 3.4.10 by Sebastian Bergmann.

    ............................................................ 60 / 233
    ............................................................ 120 / 233
    ....................SS...................................... 180 / 233
    .................S...................................

    Time: 15 seconds, Memory: 33.00Mb

    OK, but incomplete or skipped tests!
    Tests: 233, Assertions: 138, Skipped: 3.


    I had a slightly older version, so I also updated to 3.4.15 (latest
    stable) and got exactly the same results.

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

    [2010-08-16 22:24:23] konafets

    With which version of PHPUnit this works for you?
    I had update my working directory to latest trunk, but the error is
    still there.

    I tried this with PHPUnit 3.4.0 and PHPUnit 3.5.0RC1.

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

    [2010-08-16 01:17:34] squiz

    -Status: Assigned
    +Status: Closed
    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.

    Was actually a problem in SVN only, and caused by new feature to allow
    standards to contain ignore patterns. Refactored the way the custom
    testing system checks sniffs and added the generic sniffs back into the
    test list. All working now.

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

    [2010-08-14 11:54:50] konafets

    I expressed me incorrect: I can reproduce the error you mentioned with
    the current trunk when I removed the type hint. With the type hint this
    error is fixed, but my issue is still there.

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

    [2010-08-14 11:51:33] konafets

    Ok, i can confirm the error "PHP Fatal error: Call to a member function
    getFilename() on a non-object in
    /home/clockwerx/pear/PHP_CodeSniffer/trunk/tests/Standards/AbstractSniffUnitTest.php
    on line 178" against the current trunk. This doesn't occur with the
    latest alpha.

    But the origin fatal error is still there.

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

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=17699
  • Gsherwood at Aug 18, 2010 at 12:07 am
    Edit report at http://pear.php.net/bugs/bug.php?id=17699&edit=1

    ID: 17699
    Updated by: gsherwood@squiz.net
    Reported By: blueduck at gmx dot net
    Summary: Fatal error: Uncaught exception 'ReflectionException'
    Status: Closed
    Type: Bug
    Package: PHP_CodeSniffer
    Operating System: OSX 10.6
    Package Version: 1.3.0a1
    PHP Version: 5.3.2
    Assigned To: squiz
    Roadmap Versions:
    New Comment:

    Everything works fine for me from trunk. Here is the full verbose
    output.

    94:trunk gsherwood$ phpunit
    --coverage-clover=/Users/gsherwood/PHP_CodeSniffer/trunk/clover.xml
    --verbose tests/AllTests.php
    PHPUnit 3.4.15 by Sebastian Bergmann.

    PHP CodeSniffer
    PHP CodeSniffer Core
    Core_IsCamelCapsTest
    .......

    Core_ErrorSuppressionTest
    ....

    Core_ReportingTest
    ..

    Core_Reports_CheckstyleTest
    .

    Core_Reports_FullTest
    .

    Core_Reports_SummaryTest
    .

    Core_Reports_XmlTest
    .

    Core_Reports_CsvTest
    .

    Core_Reports_EmacsTest
    .

    Core_Reports_SourceTest
    .

    Core_Reports_SvnblameTest
    ..

    Core_Reports_GitblameTest
    .
    testGetGitAuthor
    .........

    PHP CodeSniffer Standards
    ...........................................................
    .................................................SS........
    ...............................................S...........
    ........................

    Time: 01:06, Memory: 68.00Mb

    There were 3 skipped tests:

    1) Squiz_Tests_Debug_JavaScriptLintUnitTest::JavaScriptLint

    /Users/gsherwood/PHP_CodeSniffer/trunk/tests/Standards/AbstractSniffUnitTest.php:82
    /Users/gsherwood/PHP_CodeSniffer/trunk/tests/TestSuite.php:49

    2) Squiz_Tests_Debug_JSLintUnitTest::JSLint

    /Users/gsherwood/PHP_CodeSniffer/trunk/tests/Standards/AbstractSniffUnitTest.php:82
    /Users/gsherwood/PHP_CodeSniffer/trunk/tests/TestSuite.php:49

    3) Zend_Tests_Debug_CodeAnalyzerUnitTest::CodeAnalyzer

    /Users/gsherwood/PHP_CodeSniffer/trunk/tests/Standards/AbstractSniffUnitTest.php:82
    /Users/gsherwood/PHP_CodeSniffer/trunk/tests/TestSuite.php:49
    OK, but incomplete or skipped tests!
    Tests: 233, Assertions: 138, Skipped: 3.

    Writing code coverage data to XML file, this may take a moment


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

    [2010-08-17 07:44:10] konafets

    Please try it with the --coverage-clover option:

    This is the output with PHPUnit 3.5.0RC1, but its the same with 3.4

    phpunit
    --coverage-clover=/Users/sok/Sites/projekte/hudson/jobs/CodeSnifferTYPO3/workspace/results/PHPUnit/Clover/clover.xml
    --verbose /Users/sok/Downloads/CodeSniffer/tests/AllTests.php

    Notice: Please no longer include "PHPUnit/Framework.php". in
    /usr/lib/php/PHPUnit/Framework.php on line 51
    PHPUnit 3.5.0RC1 by Sebastian Bergmann.

    PHP CodeSniffer
    PHP CodeSniffer Core
    Core_IsCamelCapsTest
    .......

    Core_ErrorSuppressionTest
    ....

    Core_ReportingTest
    ..

    Core_Reports_CheckstyleTest
    .

    Core_Reports_FullTest
    .

    Core_Reports_SummaryTest
    .

    Core_Reports_XmlTest
    .

    Core_Reports_CsvTest
    .

    Core_Reports_EmacsTest
    .

    Core_Reports_SourceTest
    .

    Core_Reports_SvnblameTest
    ..

    Core_Reports_GitblameTest
    .
    testGetGitAuthor
    .........

    PHP CodeSniffer Standards

    Fatal error: Uncaught exception 'ReflectionException' with message
    'Method
    Generic_Tests_Classes_DuplicateClassNameUnitTest::DuplicateClassName()
    does not exist' in /usr/lib/php/PHP/CodeCoverage/Util.php:218
    Stack trace:
    #0 /usr/lib/php/PHP/CodeCoverage/Util.php(218):
    ReflectionMethod->__construct('Generic_Tests_C...',
    'DuplicateClassN...')
    #1 /usr/lib/php/PHP/CodeCoverage.php(502):
    PHP_CodeCoverage_Util::getLinesToBeCovered('Generic_Tests_C...',
    'DuplicateClassN...')
    #2 /usr/lib/php/PHP/CodeCoverage.php(236):
    PHP_CodeCoverage->applyCoversAnnotationFilter(Array,
    Object(Generic_Tests_Classes_DuplicateClassNameUnitTest))
    #3 /usr/lib/php/PHPUnit/Framework/TestResult.php(642):
    PHP_CodeCoverage->append(Array,
    Object(Generic_Tests_Classes_DuplicateClassNameUnitTest), Array)
    #4 /usr/lib/php/PHPUnit/Framework/TestCase.php(599):
    PHPUnit_Framework_TestResult->run(Object(Generic_Tests_Classes_DuplicateClassNameUnitTest))
    #5 /usr/lib/php/PHPUnit/Framework/TestSuite.php(751):
    PHPUnit_Framework_TestCase->run(Object(PHPUnit_Framework_Te in
    /usr/lib/php/PHP/CodeCoverage/Util.php on line 218

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

    [2010-08-16 23:10:40] squiz

    This is my output:

    94:trunk gsherwood$ phpunit tests/AllTests.php
    PHPUnit 3.4.10 by Sebastian Bergmann.

    ............................................................ 60 / 233
    ............................................................ 120 / 233
    ....................SS...................................... 180 / 233
    .................S...................................

    Time: 15 seconds, Memory: 33.00Mb

    OK, but incomplete or skipped tests!
    Tests: 233, Assertions: 138, Skipped: 3.


    I had a slightly older version, so I also updated to 3.4.15 (latest
    stable) and got exactly the same results.

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

    [2010-08-16 22:24:23] konafets

    With which version of PHPUnit this works for you?
    I had update my working directory to latest trunk, but the error is
    still there.

    I tried this with PHPUnit 3.4.0 and PHPUnit 3.5.0RC1.

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

    [2010-08-16 01:17:34] squiz

    -Status: Assigned
    +Status: Closed
    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.

    Was actually a problem in SVN only, and caused by new feature to allow
    standards to contain ignore patterns. Refactored the way the custom
    testing system checks sniffs and added the generic sniffs back into the
    test list. All working now.

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

    [2010-08-14 11:54:50] konafets

    I expressed me incorrect: I can reproduce the error you mentioned with
    the current trunk when I removed the type hint. With the type hint this
    error is fixed, but my issue is still there.

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

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=17699
  • Blueduck at Aug 18, 2010 at 6:48 am
    Edit report at http://pear.php.net/bugs/bug.php?id=17699&edit=1

    ID: 17699
    Comment by: blueduck@gmx.net
    Reported By: blueduck at gmx dot net
    Summary: Fatal error: Uncaught exception 'ReflectionException'
    Status: Closed
    Type: Bug
    Package: PHP_CodeSniffer
    Operating System: OSX 10.6
    Package Version: 1.3.0a1
    PHP Version: 5.3.2
    Assigned To: squiz
    Roadmap Versions:
    New Comment:

    Thanks for the whole output.
    I downgrade my phpunit installation to 3.4.15 and now it works. So it
    seems to be an issue with phpunit 3.5.0RC1. Sebastian Bergman had done a
    lot of refactoring in this version so I don`t know exactly if the issue
    is phpcs or phpunit related. What do you think?


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

    [2010-08-18 00:06:58] squiz

    Everything works fine for me from trunk. Here is the full verbose
    output.

    94:trunk gsherwood$ phpunit
    --coverage-clover=/Users/gsherwood/PHP_CodeSniffer/trunk/clover.xml
    --verbose tests/AllTests.php
    PHPUnit 3.4.15 by Sebastian Bergmann.

    PHP CodeSniffer
    PHP CodeSniffer Core
    Core_IsCamelCapsTest
    .......

    Core_ErrorSuppressionTest
    ....

    Core_ReportingTest
    ..

    Core_Reports_CheckstyleTest
    .

    Core_Reports_FullTest
    .

    Core_Reports_SummaryTest
    .

    Core_Reports_XmlTest
    .

    Core_Reports_CsvTest
    .

    Core_Reports_EmacsTest
    .

    Core_Reports_SourceTest
    .

    Core_Reports_SvnblameTest
    ..

    Core_Reports_GitblameTest
    .
    testGetGitAuthor
    .........

    PHP CodeSniffer Standards
    ...........................................................
    .................................................SS........
    ...............................................S...........
    ........................

    Time: 01:06, Memory: 68.00Mb

    There were 3 skipped tests:

    1) Squiz_Tests_Debug_JavaScriptLintUnitTest::JavaScriptLint

    /Users/gsherwood/PHP_CodeSniffer/trunk/tests/Standards/AbstractSniffUnitTest.php:82
    /Users/gsherwood/PHP_CodeSniffer/trunk/tests/TestSuite.php:49

    2) Squiz_Tests_Debug_JSLintUnitTest::JSLint

    /Users/gsherwood/PHP_CodeSniffer/trunk/tests/Standards/AbstractSniffUnitTest.php:82
    /Users/gsherwood/PHP_CodeSniffer/trunk/tests/TestSuite.php:49

    3) Zend_Tests_Debug_CodeAnalyzerUnitTest::CodeAnalyzer

    /Users/gsherwood/PHP_CodeSniffer/trunk/tests/Standards/AbstractSniffUnitTest.php:82
    /Users/gsherwood/PHP_CodeSniffer/trunk/tests/TestSuite.php:49
    OK, but incomplete or skipped tests!
    Tests: 233, Assertions: 138, Skipped: 3.

    Writing code coverage data to XML file, this may take a moment

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

    [2010-08-17 07:44:10] konafets

    Please try it with the --coverage-clover option:

    This is the output with PHPUnit 3.5.0RC1, but its the same with 3.4

    phpunit
    --coverage-clover=/Users/sok/Sites/projekte/hudson/jobs/CodeSnifferTYPO3/workspace/results/PHPUnit/Clover/clover.xml
    --verbose /Users/sok/Downloads/CodeSniffer/tests/AllTests.php

    Notice: Please no longer include "PHPUnit/Framework.php". in
    /usr/lib/php/PHPUnit/Framework.php on line 51
    PHPUnit 3.5.0RC1 by Sebastian Bergmann.

    PHP CodeSniffer
    PHP CodeSniffer Core
    Core_IsCamelCapsTest
    .......

    Core_ErrorSuppressionTest
    ....

    Core_ReportingTest
    ..

    Core_Reports_CheckstyleTest
    .

    Core_Reports_FullTest
    .

    Core_Reports_SummaryTest
    .

    Core_Reports_XmlTest
    .

    Core_Reports_CsvTest
    .

    Core_Reports_EmacsTest
    .

    Core_Reports_SourceTest
    .

    Core_Reports_SvnblameTest
    ..

    Core_Reports_GitblameTest
    .
    testGetGitAuthor
    .........

    PHP CodeSniffer Standards

    Fatal error: Uncaught exception 'ReflectionException' with message
    'Method
    Generic_Tests_Classes_DuplicateClassNameUnitTest::DuplicateClassName()
    does not exist' in /usr/lib/php/PHP/CodeCoverage/Util.php:218
    Stack trace:
    #0 /usr/lib/php/PHP/CodeCoverage/Util.php(218):
    ReflectionMethod->__construct('Generic_Tests_C...',
    'DuplicateClassN...')
    #1 /usr/lib/php/PHP/CodeCoverage.php(502):
    PHP_CodeCoverage_Util::getLinesToBeCovered('Generic_Tests_C...',
    'DuplicateClassN...')
    #2 /usr/lib/php/PHP/CodeCoverage.php(236):
    PHP_CodeCoverage->applyCoversAnnotationFilter(Array,
    Object(Generic_Tests_Classes_DuplicateClassNameUnitTest))
    #3 /usr/lib/php/PHPUnit/Framework/TestResult.php(642):
    PHP_CodeCoverage->append(Array,
    Object(Generic_Tests_Classes_DuplicateClassNameUnitTest), Array)
    #4 /usr/lib/php/PHPUnit/Framework/TestCase.php(599):
    PHPUnit_Framework_TestResult->run(Object(Generic_Tests_Classes_DuplicateClassNameUnitTest))
    #5 /usr/lib/php/PHPUnit/Framework/TestSuite.php(751):
    PHPUnit_Framework_TestCase->run(Object(PHPUnit_Framework_Te in
    /usr/lib/php/PHP/CodeCoverage/Util.php on line 218

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

    [2010-08-16 23:10:40] squiz

    This is my output:

    94:trunk gsherwood$ phpunit tests/AllTests.php
    PHPUnit 3.4.10 by Sebastian Bergmann.

    ............................................................ 60 / 233
    ............................................................ 120 / 233
    ....................SS...................................... 180 / 233
    .................S...................................

    Time: 15 seconds, Memory: 33.00Mb

    OK, but incomplete or skipped tests!
    Tests: 233, Assertions: 138, Skipped: 3.


    I had a slightly older version, so I also updated to 3.4.15 (latest
    stable) and got exactly the same results.

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

    [2010-08-16 22:24:23] konafets

    With which version of PHPUnit this works for you?
    I had update my working directory to latest trunk, but the error is
    still there.

    I tried this with PHPUnit 3.4.0 and PHPUnit 3.5.0RC1.

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

    [2010-08-16 01:17:34] squiz

    -Status: Assigned
    +Status: Closed
    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.

    Was actually a problem in SVN only, and caused by new feature to allow
    standards to contain ignore patterns. Refactored the way the custom
    testing system checks sniffs and added the generic sniffs back into the
    test list. All working now.

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

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=17699
  • Gsherwood at Aug 19, 2010 at 4:19 am
    Edit report at http://pear.php.net/bugs/bug.php?id=17699&edit=1

    ID: 17699
    Updated by: gsherwood@squiz.net
    Reported By: blueduck at gmx dot net
    -Summary: Fatal error: Uncaught exception 'ReflectionException'
    +Summary: Fatal error generating code coverage with PHPUnit
    5.3.0RC1
    Status: Closed
    Type: Bug
    Package: PHP_CodeSniffer
    Operating System: OSX 10.6
    Package Version: 1.3.0a1
    PHP Version: 5.3.2
    Assigned To: squiz
    Roadmap Versions:
    New Comment:

    -Summary: Fatal error: Uncaught exception
    'ReflectionException'
    +Summary: Fatal error generating code coverage with PHPUnit
    5.3.0RC1
    I took a look into this and found there was a change in 3.5.0 to the way
    code coverage works so that it now requires the name of the unit test to
    be a real method. So I changed that in the PHPCS test suite and it is
    working now for me. Change has been committed to SVN.


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

    [2010-08-18 06:48:29] konafets

    Thanks for the whole output.
    I downgrade my phpunit installation to 3.4.15 and now it works. So it
    seems to be an issue with phpunit 3.5.0RC1. Sebastian Bergman had done a
    lot of refactoring in this version so I don`t know exactly if the issue
    is phpcs or phpunit related. What do you think?

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

    [2010-08-18 00:06:58] squiz

    Everything works fine for me from trunk. Here is the full verbose
    output.

    94:trunk gsherwood$ phpunit
    --coverage-clover=/Users/gsherwood/PHP_CodeSniffer/trunk/clover.xml
    --verbose tests/AllTests.php
    PHPUnit 3.4.15 by Sebastian Bergmann.

    PHP CodeSniffer
    PHP CodeSniffer Core
    Core_IsCamelCapsTest
    .......

    Core_ErrorSuppressionTest
    ....

    Core_ReportingTest
    ..

    Core_Reports_CheckstyleTest
    .

    Core_Reports_FullTest
    .

    Core_Reports_SummaryTest
    .

    Core_Reports_XmlTest
    .

    Core_Reports_CsvTest
    .

    Core_Reports_EmacsTest
    .

    Core_Reports_SourceTest
    .

    Core_Reports_SvnblameTest
    ..

    Core_Reports_GitblameTest
    .
    testGetGitAuthor
    .........

    PHP CodeSniffer Standards
    ...........................................................
    .................................................SS........
    ...............................................S...........
    ........................

    Time: 01:06, Memory: 68.00Mb

    There were 3 skipped tests:

    1) Squiz_Tests_Debug_JavaScriptLintUnitTest::JavaScriptLint

    /Users/gsherwood/PHP_CodeSniffer/trunk/tests/Standards/AbstractSniffUnitTest.php:82
    /Users/gsherwood/PHP_CodeSniffer/trunk/tests/TestSuite.php:49

    2) Squiz_Tests_Debug_JSLintUnitTest::JSLint

    /Users/gsherwood/PHP_CodeSniffer/trunk/tests/Standards/AbstractSniffUnitTest.php:82
    /Users/gsherwood/PHP_CodeSniffer/trunk/tests/TestSuite.php:49

    3) Zend_Tests_Debug_CodeAnalyzerUnitTest::CodeAnalyzer

    /Users/gsherwood/PHP_CodeSniffer/trunk/tests/Standards/AbstractSniffUnitTest.php:82
    /Users/gsherwood/PHP_CodeSniffer/trunk/tests/TestSuite.php:49
    OK, but incomplete or skipped tests!
    Tests: 233, Assertions: 138, Skipped: 3.

    Writing code coverage data to XML file, this may take a moment

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

    [2010-08-17 07:44:10] konafets

    Please try it with the --coverage-clover option:

    This is the output with PHPUnit 3.5.0RC1, but its the same with 3.4

    phpunit
    --coverage-clover=/Users/sok/Sites/projekte/hudson/jobs/CodeSnifferTYPO3/workspace/results/PHPUnit/Clover/clover.xml
    --verbose /Users/sok/Downloads/CodeSniffer/tests/AllTests.php

    Notice: Please no longer include "PHPUnit/Framework.php". in
    /usr/lib/php/PHPUnit/Framework.php on line 51
    PHPUnit 3.5.0RC1 by Sebastian Bergmann.

    PHP CodeSniffer
    PHP CodeSniffer Core
    Core_IsCamelCapsTest
    .......

    Core_ErrorSuppressionTest
    ....

    Core_ReportingTest
    ..

    Core_Reports_CheckstyleTest
    .

    Core_Reports_FullTest
    .

    Core_Reports_SummaryTest
    .

    Core_Reports_XmlTest
    .

    Core_Reports_CsvTest
    .

    Core_Reports_EmacsTest
    .

    Core_Reports_SourceTest
    .

    Core_Reports_SvnblameTest
    ..

    Core_Reports_GitblameTest
    .
    testGetGitAuthor
    .........

    PHP CodeSniffer Standards

    Fatal error: Uncaught exception 'ReflectionException' with message
    'Method
    Generic_Tests_Classes_DuplicateClassNameUnitTest::DuplicateClassName()
    does not exist' in /usr/lib/php/PHP/CodeCoverage/Util.php:218
    Stack trace:
    #0 /usr/lib/php/PHP/CodeCoverage/Util.php(218):
    ReflectionMethod->__construct('Generic_Tests_C...',
    'DuplicateClassN...')
    #1 /usr/lib/php/PHP/CodeCoverage.php(502):
    PHP_CodeCoverage_Util::getLinesToBeCovered('Generic_Tests_C...',
    'DuplicateClassN...')
    #2 /usr/lib/php/PHP/CodeCoverage.php(236):
    PHP_CodeCoverage->applyCoversAnnotationFilter(Array,
    Object(Generic_Tests_Classes_DuplicateClassNameUnitTest))
    #3 /usr/lib/php/PHPUnit/Framework/TestResult.php(642):
    PHP_CodeCoverage->append(Array,
    Object(Generic_Tests_Classes_DuplicateClassNameUnitTest), Array)
    #4 /usr/lib/php/PHPUnit/Framework/TestCase.php(599):
    PHPUnit_Framework_TestResult->run(Object(Generic_Tests_Classes_DuplicateClassNameUnitTest))
    #5 /usr/lib/php/PHPUnit/Framework/TestSuite.php(751):
    PHPUnit_Framework_TestCase->run(Object(PHPUnit_Framework_Te in
    /usr/lib/php/PHP/CodeCoverage/Util.php on line 218

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

    [2010-08-16 23:10:40] squiz

    This is my output:

    94:trunk gsherwood$ phpunit tests/AllTests.php
    PHPUnit 3.4.10 by Sebastian Bergmann.

    ............................................................ 60 / 233
    ............................................................ 120 / 233
    ....................SS...................................... 180 / 233
    .................S...................................

    Time: 15 seconds, Memory: 33.00Mb

    OK, but incomplete or skipped tests!
    Tests: 233, Assertions: 138, Skipped: 3.


    I had a slightly older version, so I also updated to 3.4.15 (latest
    stable) and got exactly the same results.

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

    [2010-08-16 22:24:23] konafets

    With which version of PHPUnit this works for you?
    I had update my working directory to latest trunk, but the error is
    still there.

    I tried this with PHPUnit 3.4.0 and PHPUnit 3.5.0RC1.

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

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=17699
  • Blueduck at Aug 19, 2010 at 11:15 am
    Edit report at http://pear.php.net/bugs/bug.php?id=17699&edit=1

    ID: 17699
    Comment by: blueduck@gmx.net
    Reported By: blueduck at gmx dot net
    Summary: Fatal error generating code coverage with PHPUnit
    5.3.0RC1
    Status: Closed
    Type: Bug
    Package: PHP_CodeSniffer
    Operating System: OSX 10.6
    Package Version: 1.3.0a1
    PHP Version: 5.3.2
    Assigned To: squiz
    Roadmap Versions:
    New Comment:

    Hey,

    thanks a lot for your very fast work, guys. For me it works also.


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

    [2010-08-19 04:19:08] squiz

    -Summary: Fatal error: Uncaught exception
    'ReflectionException'
    +Summary: Fatal error generating code coverage with PHPUnit
    5.3.0RC1
    I took a look into this and found there was a change in 3.5.0 to the way
    code coverage works so that it now requires the name of the unit test to
    be a real method. So I changed that in the PHPCS test suite and it is
    working now for me. Change has been committed to SVN.

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

    [2010-08-18 06:48:29] konafets

    Thanks for the whole output.
    I downgrade my phpunit installation to 3.4.15 and now it works. So it
    seems to be an issue with phpunit 3.5.0RC1. Sebastian Bergman had done a
    lot of refactoring in this version so I don`t know exactly if the issue
    is phpcs or phpunit related. What do you think?

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

    [2010-08-18 00:06:58] squiz

    Everything works fine for me from trunk. Here is the full verbose
    output.

    94:trunk gsherwood$ phpunit
    --coverage-clover=/Users/gsherwood/PHP_CodeSniffer/trunk/clover.xml
    --verbose tests/AllTests.php
    PHPUnit 3.4.15 by Sebastian Bergmann.

    PHP CodeSniffer
    PHP CodeSniffer Core
    Core_IsCamelCapsTest
    .......

    Core_ErrorSuppressionTest
    ....

    Core_ReportingTest
    ..

    Core_Reports_CheckstyleTest
    .

    Core_Reports_FullTest
    .

    Core_Reports_SummaryTest
    .

    Core_Reports_XmlTest
    .

    Core_Reports_CsvTest
    .

    Core_Reports_EmacsTest
    .

    Core_Reports_SourceTest
    .

    Core_Reports_SvnblameTest
    ..

    Core_Reports_GitblameTest
    .
    testGetGitAuthor
    .........

    PHP CodeSniffer Standards
    ...........................................................
    .................................................SS........
    ...............................................S...........
    ........................

    Time: 01:06, Memory: 68.00Mb

    There were 3 skipped tests:

    1) Squiz_Tests_Debug_JavaScriptLintUnitTest::JavaScriptLint

    /Users/gsherwood/PHP_CodeSniffer/trunk/tests/Standards/AbstractSniffUnitTest.php:82
    /Users/gsherwood/PHP_CodeSniffer/trunk/tests/TestSuite.php:49

    2) Squiz_Tests_Debug_JSLintUnitTest::JSLint

    /Users/gsherwood/PHP_CodeSniffer/trunk/tests/Standards/AbstractSniffUnitTest.php:82
    /Users/gsherwood/PHP_CodeSniffer/trunk/tests/TestSuite.php:49

    3) Zend_Tests_Debug_CodeAnalyzerUnitTest::CodeAnalyzer

    /Users/gsherwood/PHP_CodeSniffer/trunk/tests/Standards/AbstractSniffUnitTest.php:82
    /Users/gsherwood/PHP_CodeSniffer/trunk/tests/TestSuite.php:49
    OK, but incomplete or skipped tests!
    Tests: 233, Assertions: 138, Skipped: 3.

    Writing code coverage data to XML file, this may take a moment

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

    [2010-08-17 07:44:10] konafets

    Please try it with the --coverage-clover option:

    This is the output with PHPUnit 3.5.0RC1, but its the same with 3.4

    phpunit
    --coverage-clover=/Users/sok/Sites/projekte/hudson/jobs/CodeSnifferTYPO3/workspace/results/PHPUnit/Clover/clover.xml
    --verbose /Users/sok/Downloads/CodeSniffer/tests/AllTests.php

    Notice: Please no longer include "PHPUnit/Framework.php". in
    /usr/lib/php/PHPUnit/Framework.php on line 51
    PHPUnit 3.5.0RC1 by Sebastian Bergmann.

    PHP CodeSniffer
    PHP CodeSniffer Core
    Core_IsCamelCapsTest
    .......

    Core_ErrorSuppressionTest
    ....

    Core_ReportingTest
    ..

    Core_Reports_CheckstyleTest
    .

    Core_Reports_FullTest
    .

    Core_Reports_SummaryTest
    .

    Core_Reports_XmlTest
    .

    Core_Reports_CsvTest
    .

    Core_Reports_EmacsTest
    .

    Core_Reports_SourceTest
    .

    Core_Reports_SvnblameTest
    ..

    Core_Reports_GitblameTest
    .
    testGetGitAuthor
    .........

    PHP CodeSniffer Standards

    Fatal error: Uncaught exception 'ReflectionException' with message
    'Method
    Generic_Tests_Classes_DuplicateClassNameUnitTest::DuplicateClassName()
    does not exist' in /usr/lib/php/PHP/CodeCoverage/Util.php:218
    Stack trace:
    #0 /usr/lib/php/PHP/CodeCoverage/Util.php(218):
    ReflectionMethod->__construct('Generic_Tests_C...',
    'DuplicateClassN...')
    #1 /usr/lib/php/PHP/CodeCoverage.php(502):
    PHP_CodeCoverage_Util::getLinesToBeCovered('Generic_Tests_C...',
    'DuplicateClassN...')
    #2 /usr/lib/php/PHP/CodeCoverage.php(236):
    PHP_CodeCoverage->applyCoversAnnotationFilter(Array,
    Object(Generic_Tests_Classes_DuplicateClassNameUnitTest))
    #3 /usr/lib/php/PHPUnit/Framework/TestResult.php(642):
    PHP_CodeCoverage->append(Array,
    Object(Generic_Tests_Classes_DuplicateClassNameUnitTest), Array)
    #4 /usr/lib/php/PHPUnit/Framework/TestCase.php(599):
    PHPUnit_Framework_TestResult->run(Object(Generic_Tests_Classes_DuplicateClassNameUnitTest))
    #5 /usr/lib/php/PHPUnit/Framework/TestSuite.php(751):
    PHPUnit_Framework_TestCase->run(Object(PHPUnit_Framework_Te in
    /usr/lib/php/PHP/CodeCoverage/Util.php on line 218

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

    [2010-08-16 23:10:40] squiz

    This is my output:

    94:trunk gsherwood$ phpunit tests/AllTests.php
    PHPUnit 3.4.10 by Sebastian Bergmann.

    ............................................................ 60 / 233
    ............................................................ 120 / 233
    ....................SS...................................... 180 / 233
    .................S...................................

    Time: 15 seconds, Memory: 33.00Mb

    OK, but incomplete or skipped tests!
    Tests: 233, Assertions: 138, Skipped: 3.


    I had a slightly older version, so I also updated to 3.4.15 (latest
    stable) and got exactly the same results.

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

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=17699

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedAug 14, '10 at 2:11a
activeAug 19, '10 at 11:15a
posts14
users4
websitepear.php.net

People

Translate

site design / logo © 2022 Grokbase