-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHPUnit 3.6.0: Undefined index: addUncoveredFilesFromWhitelist in /usr/share/php/PHPUnit/TextUI/TestRunner.php on line 254 #391
Comments
I cannot reproduce this. |
Exact steps to reproduce:
PHPUnit installed and updated via PEAR. Thanks. |
I will not install an IDE to reproduce a PHPUnit issue. |
Although I was unable to reproduce your issue, 36bbe32 might be somehow related. |
Great, you are so nice! gapon@cattie ~/NetBeansProjects/Calculator/test $ /usr/bin/phpunit --log-junit /tmp/nb-phpunit-log.xml --coverage-clover /tmp/nb-phpunit-coverage.xml CalculatorTest.php PHPUnit 3.6.0 by Sebastian Bergmann. PHP Notice: Undefined index: addUncoveredFilesFromWhitelist in /usr/share/php/PHPUnit/TextUI/TestRunner.php on line 254 |
Did you try it with the patch above? Do you have a |
No.
No. |
I could reproduce it with 3.6.0. In bankaccount:
But it seems the --coverage-text fix solved that issue too as it doesn't happen when running from master |
Still reproducible for me with PHPUnit 3.6.1. Why cannot I reopen this issue?? gapon@cattie ~/NetBeansProjects/Calculator-test $ /usr/bin/phpunit --log-junit /tmp/nb-phpunit-log.xml --coverage-clover /tmp/nb-phpunit-coverage.xml CalculatorTest.php Notice: Undefined index: addUncoveredFilesFromWhitelist in /usr/share/php/PHPUnit/TextUI/TestRunner.php on line 256 Call Stack: Fatal error: Uncaught exception 'InvalidArgumentException' in /usr/share/php/PHP/CodeCoverage.php on line 386 InvalidArgumentException: in /usr/share/php/PHP/CodeCoverage.php on line 386 Call Stack: |
Fixed in 3.6.2. Now the issue should have been marked as CLOSED and FIXED. gapon@cattie ~/NetBeansProjects/Calculator-test $ /usr/bin/phpunit --log-junit /tmp/nb-phpunit-log.xml --coverage-clover /tmp/nb-phpunit-coverage.xml CalculatorTest.php .... Time: 1 second, Memory: 7.00Mb OK (4 tests, 4 assertions) Writing code coverage data to XML file, this may take a moment. |
I just updated PHPUnit and I'm getting this bug. It only happens when I try to generate a code coverage report. PHP_CodeCoverage 1.2.8
Here's my xml config:
|
@poisa, your stack trace looks strange. Seems PHPUnit files are being loaded from two different locations:
Could this be related? |
Great catch! I had PHPUnit installed via composer for this particular test project and some files were being read from my PEAR install. I upgraded PEAR's version to the latest and all is good. I will uninstall one of them so it all runs from where it should. Thanks! |
No problem :) |
Try to run test with code-coverage enabled. Result:
PHP Notice: Undefined index: addUncoveredFilesFromWhitelist in /usr/share/php/PHPUnit/TextUI/TestRunner.php on line 254
PHP Stack trace:
PHP 1. {main}() /usr/bin/phpunit:0
PHP 2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46
PHP 3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:126
PHP 4. PHPUnit_TextUI_TestRunner->doRun() /usr/share/php/PHPUnit/TextUI/Command.php:188
PHP Fatal error: Uncaught exception 'InvalidArgumentException' in /usr/share/php/PHP/CodeCoverage.php:386
Stack trace:
#0 /usr/share/php/PHPUnit/TextUI/TestRunner.php(255): PHP_CodeCoverage->setProcessUncoveredFilesFromWhitelist(NULL)
#1 /usr/share/php/PHPUnit/TextUI/Command.php(188): PHPUnit_TextUI_TestRunner->doRun(Object(NetBeansSuite), Array)
#2 /usr/share/php/PHPUnit/TextUI/Command.php(126): PHPUnit_TextUI_Command->run(Array, true)
#3 /usr/bin/phpunit(46): PHPUnit_TextUI_Command::main()
#4 {main}
thrown in /usr/share/php/PHP/CodeCoverage.php on line 386
PHPUnit 3.6.0 by Sebastian Bergmann.
The text was updated successfully, but these errors were encountered: