Closed ohnotnow closed 5 years ago
Try to set up 'DRIVER=pcov' as an Environment Variable and then start phpunit.
https://github.com/lukas9393/dockerfiles/blob/master/laravel-phpunit-pcov/Dockerfile
Thanks for the reply - sadly it didn't make a difference though.
$ echo ${DRIVER}
pcov
$ php vendor/bin/phpunit --coverage-text --colors=never
PHPUnit 7.5.9 by Sebastian Bergmann and contributors.
Fatal error: Uncaught SebastianBergmann\CodeCoverage\RuntimeException: No code coverage driver available in /builds/ohffs/glasgow_projects/vendor/phpunit/php-code-coverage/src/CodeCoverage.php:908
pcov requires phpunit 8
On Fri, 26 Apr 2019, 14:17 ohnotnow, notifications@github.com wrote:
Thanks for the reply - sadly it didn't make a difference though.
$ echo ${DRIVER} pcov $ php vendor/bin/phpunit --coverage-text --colors=never
PHPUnit 7.5.9 by Sebastian Bergmann and contributors.
Fatal error: Uncaught SebastianBergmann\CodeCoverage\RuntimeException: No code coverage driver available in /builds/ohffs/glasgow_projects/vendor/phpunit/php-code-coverage/src/CodeCoverage.php:908
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/krakjoe/pcov/issues/13#issuecomment-487036455, or mute the thread https://github.com/notifications/unsubscribe-auth/AARB52R2H5ZMZSIKHUQLWILPSLXEXANCNFSM4HIUEJJQ .
Oh, ffs! Now I remember thinking a few weeks ago 'Well, I'll hold off trying pcov for a bit' after reading that. Riiiiight up until today when I thought 'heh - it's Friday, I'll try that pcov thing!'.
Sorry - Friday brain fade!
Hi,
It's very, very likely I'm doing something wrong - so apologies in advance! I've installed the extension using pecl and added an ini entry with
pcov.enabled = 1
just to be sure. When I run phpunit I get the above exception message back from the code coverage driver though. Things look ok to me :