Closed shanliu closed 5 years ago
That will be a path problem, you are running tests in the tests directory I assume, and since it has a src directory, pcov chooses that as the path to collect for ... it expects to be run from the root directory of the project, or have path (pcov.directory) set correctly.
test code:https://github.com/shanliu/tmp_test xdebug ouput:(success) PHPUnit 8.0.6 by Sebastian Bergmann and contributors.
.. 2 / 2 (100%)
Time: 149 ms, Memory: 6.00 MB
OK (2 tests, 2 assertions)
Code Coverage Report: 2019-05-05 07:50:41
Summary: Classes: 100.00% (1/1) Methods: 100.00% (2/2) Lines: 100.00% (4/4)
Mycode Methods: 100.00% ( 2/ 2) Lines: 100.00% ( 4/ 4) PCOV output:(fail) PHPUnit 8.0.6 by Sebastian Bergmann and contributors.
.. 2 / 2 (100%)
Time: 130 ms, Memory: 6.00 MB
OK (2 tests, 2 assertions)
Code Coverage Report: 2019-05-05 07:50:28
Summary: Classes: 0.00% (0/1) Methods: 0.00% (0/2) Lines: 0.00% (0/6)
Mycode Methods: 0.00% ( 0/ 2) Lines: 0.00% ( 0/ 6) (not working...)