就我而言:
我跑步时
vendor/bin/phpunit --coverage-html coverage
错误来了:
PHPUnit 6.5.8 by Sebastian Bergmann and contributors. Error: No code coverage driver is available
然后我安装了Xdebug
sudo apt-get install php-xdebug
但是当我再次跑步时
vendor/bin/phpunit --coverage-html coverage
出现错误:
PHPUnit 6.5.8 by Sebastian Bergmann and contributors. Undefined variable: view
答案 0 :(得分:0)
在测试类中,您可能使用了尚未初始化的名为“ view”的变量