更新时间:2023-02-24 07:46:52
事实证明,答案非常简单.我只需要从测试覆盖率生成中排除路由文件:
As it turned out, the answer was fairly straightforward. I just needed to exclude the routes file from the test coverage generation:
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./src</directory>
<exclude>
<directory suffix=".php">./src/database</directory>
<file>./src/routes.php</file>
</exclude>
</whitelist>
</filter>