Php 拉威尔码覆盖率
我试图让我的代码覆盖率报告涵盖我的所有laravel应用程序代码(控制器和模型)。出于某种原因,它只涉及一个测试。下面的配置是否有问题Php 拉威尔码覆盖率,php,laravel,phpunit,Php,Laravel,Phpunit,我试图让我的代码覆盖率报告涵盖我的所有laravel应用程序代码(控制器和模型)。出于某种原因,它只涉及一个测试。下面的配置是否有问题 <phpunit colors="true" bootstrap="/Users/bob/projects/leonardo2/laravel/cli/tasks/test/phpunit.php" backupGlobals="false"> <testsuites> <tests
<phpunit colors="true"
bootstrap="/Users/bob/projects/leonardo2/laravel/cli/tasks/test/phpunit.php"
backupGlobals="false">
<testsuites>
<testsuite name="Test Suite">
<directory suffix=".test.php">/Users/bob/projects/leonardo2/application/tests</directory>
</testsuite>
</testsuites>
<filter>
<blacklist>
<exclude>
<directory suffix=".test.php">/Users/bob/projects/leonardo2/application/tests</directory>
</exclude>
</blacklist>
<whitelist>
<exclude>
<directory suffix=".php">/Users/bob/projects/leonardo2/application/config</directory>
<directory suffix=".php">/Users/bob/projects/leonardo2/application/views</directory>
<directory suffix=".php">/Users/bob/projects/leonardo2/application/migrations</directory>
<directory suffix=".php">/Users/bob/projects/leonardo2/application/libraries</directory>
<directory suffix=".php">/Users/bob/projects/leonardo2/application/tasks</directory>
<directory suffix=".php">/Users/bob/projects/leonardo2/application/language</directory>
</exclude>
</whitelist>
</filter>
<logging>
<log type="coverage-html" target="./storage/work/report/" charset="UTF-8"
highlight="false" lowUpperBound="35" highLowerBound="70"/>
</logging>
</phpunit>
/用户/鲍勃/项目/莱昂纳多/应用程序/测试
/用户/鲍勃/项目/莱昂纳多/应用程序/测试
/用户/bob/projects/leonardo2/application/config
/用户/bob/projects/leonardo2/application/views
/用户/bob/项目/leonardo2/应用程序/迁移
/用户/bob/projects/leonardo2/application/libraries
/用户/bob/项目/leonardo2/应用程序/任务
/用户/bob/projects/leonardo2/application/language
我想不需要这么多复杂的条件。只需将应用程序目录添加到过滤器标签下的白名单中
<filter>
<whitelist>
<directory suffix=".php">app/</directory>
</whitelist>
</filter>
应用程序/
通过此链接可以更好地理解。
您是否尝试过将phpunit.xml文件还原为基本文件,以查看它是否包含所有内容?此外,我认为不需要aboslute路径,如果其他人试图运行您的测试,它就会中断。