I'm getting incorrect code coverage reports with PHPUnit, and I believe it's a bug with XDebug.
How can I configure PHPUnit to use one of its other drivers, namely, PHPDBG?
(I'm using PHPUnit 4.7.7 and PHP 5.5.12)
I'm getting incorrect code coverage reports with PHPUnit, and I believe it's a bug with XDebug.
How can I configure PHPUnit to use one of its other drivers, namely, PHPDBG?
(I'm using PHPUnit 4.7.7 and PHP 5.5.12)
Copyright © 2021 Jogjafile Inc.
PHPUnit selects the driver from the PHP Runtime environment so to run PHPUnit with PHPDBG you have to have that binary installed.
You will have to compile PHP with the option '--enable-phpdbg' but this is only for PHP 5.6 and above.
The instructions for installing for PHP 5.4 and above are, (these are taken from https://github.com/krakjoe/phpdbg), and to quote
Once installed you have to call PHPUnit through the phpdbg binary mine is located in '/usr/local/php7/bin' so the command I would use is
This assumes your 'phpunit' is in your environment path else use the full or relative path to your 'phpunit'.
I have PHPUnit installed via composer in my project source folder which is three directories up in the 'vendor' folder so my command would be
For more information see the documentation for PHPDBG http://phpdbg.com/docs/introduction
Hope this helps