{"issue":{"state":"closed","pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"user":{"avatar_url":"https://secure.gravatar.com/avatar/33aa15f19fec4706fedc188951fd3d24?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"33aa15f19fec4706fedc188951fd3d24","url":"https://api.github.com/users/davidkuridza","login":"davidkuridza","id":953796},"milestone":null,"labels":[],"updated_at":"2011-11-06T17:35:52Z","assignee":null,"comments":6,"closed_at":"2011-09-30T08:46:25Z","url":"https://api.github.com/repos/sebastianbergmann/phpunit/issues/353","body":"I am running PHPUnit 3.5.15 on a freshly installed Ubuntu 11.04 64bit. Tests are running fine, however, when trying to run code coverage as well, an error is thrown:\r\n\r\n    $ phpunit --coverage-html build/coverage/ Tests/SomeTest.php \r\n    PHPUnit 3.5.15 by Sebastian Bergmann.\r\n\r\n    ...\r\n\r\n    Time: 1 second, Memory: 6.00Mb\r\n\r\n    OK (3 tests, 30 assertions)\r\n\r\n    Generating code coverage report, this may take a moment.\r\n    Fatal error: Class 'PHP_Token_Stream' not found in /usr/share/php/PHP/Token/Stream/CachingFactory.php on line 68\r\n\r\n    Call Stack:\r\n        0.0002     639560   1. {main}() /usr/bin/phpunit:0\r\n        0.0132    1151288   2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:49\r\n        0.0132    1152160   3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:129\r\n        0.0300    4052112   4. PHPUnit_TextUI_TestRunner->doRun() /usr/share/php/PHPUnit/TextUI/Command.php:188\r\n        1.5055    5682376   5. PHP_CodeCoverage_Report_HTML->process() /usr/share/php/PHPUnit/TextUI/TestRunner.php:363\r\n        1.5059    5733328   6. PHP_CodeCoverage_Report_HTML->addItems() /usr/share/php/PHP/CodeCoverage/Report/HTML.php:135\r\n        1.5059    5734064   7. PHP_CodeCoverage_Report_HTML_Node_Directory->addFile() /usr/share/php/PHP/CodeCoverage/Report/HTML.php:213\r\n        1.5059    5737416   8. PHP_CodeCoverage_Report_HTML_Node_File->__construct() /usr/share/php/PHP/CodeCoverage/Report/HTML/Node/Directory.php:156\r\n        1.5062    5801152   9. PHP_CodeCoverage_Util::getLinesToBeIgnored() /usr/share/php/PHP/CodeCoverage/Report/HTML/Node/File.php:169\r\n        1.5063    5801792  10. PHP_Token_Stream_CachingFactory::get() /usr/share/php/PHP/CodeCoverage/Util.php:271\r\n\r\nI have manually included missing file in `/usr/share/php/PHP/Token/Stream/CachingFactory.php` for debugging purposes, the diff is\r\n\r\n    68d67\r\n    <             include_once '/usr/share/php/PHP/Token/Stream.php';\r\n\r\nRunning the same test again results in following error:\r\n\r\n    Generating code coverage report, this may take a moment.\r\n    Fatal error: Class 'PHP_Token_OPEN_TAG' not found in /usr/share/php/PHP/Token/Stream.php on line 205\r\n\r\n    Call Stack:\r\n        0.0002     639560   1. {main}() /usr/bin/phpunit:0\r\n        0.0132    1151288   2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:49\r\n        0.0132    1152160   3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:129\r\n        0.0302    4052608   4. PHPUnit_TextUI_TestRunner->doRun() /usr/share/php/PHPUnit/TextUI/Command.php:188\r\n        1.5091    5682912   5. PHP_CodeCoverage_Report_HTML->process() /usr/share/php/PHPUnit/TextUI/TestRunner.php:363\r\n        1.5095    5733840   6. PHP_CodeCoverage_Report_HTML->addItems() /usr/share/php/PHP/CodeCoverage/Report/HTML.php:135\r\n        1.5095    5734576   7. PHP_CodeCoverage_Report_HTML_Node_Directory->addFile() /usr/share/php/PHP/CodeCoverage/Report/HTML.php:213\r\n        1.5095    5737928   8. PHP_CodeCoverage_Report_HTML_Node_File->__construct() /usr/share/php/PHP/CodeCoverage/Report/HTML/Node/Directory.php:156\r\n        1.5099    5801688   9. PHP_CodeCoverage_Util::getLinesToBeIgnored() /usr/share/php/PHP/CodeCoverage/Report/HTML/Node/File.php:169\r\n        1.5099    5802328  10. PHP_Token_Stream_CachingFactory::get() /usr/share/php/PHP/CodeCoverage/Util.php:271\r\n        1.5106    5953392  11. PHP_Token_Stream->__construct() /usr/share/php/PHP/Token/Stream/CachingFactory.php:69\r\n        1.5106    5957656  12. PHP_Token_Stream->scan() /usr/share/php/PHP/Token/Stream.php:147\r\n\r\nHas anyone experienced this behaviour? I'll try looking into it more closely in the upcoming days.","html_url":"https://github.com/sebastianbergmann/phpunit/issues/353","title":"Code coverage problem: Fatal error: Class 'PHP_Token_Stream' not found","number":353,"id":1738086,"created_at":"2011-09-26T09:42:29Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/ecd7f90187a7e02452731e20adfa7b26?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"ecd7f90187a7e02452731e20adfa7b26","url":"https://api.github.com/users/danielhunt","login":"danielhunt","id":99176},"updated_at":"2011-11-06T17:35:52Z","url":"https://api.github.com/repos/sebastianbergmann/phpunit/issues/comments/2646402","body":"My response to your first question actually got me thinking - it didn't make sense that my include_path was missing the normal paths, so I went digging - it looks like I'm having problems with autoloading class files.\r\nI'll need to look into this a bit more I think\r\n\r\nThanks for the responses though","id":2646402,"created_at":"2011-11-06T17:35:52Z"}}