【发布时间】:2021-12-31 19:52:33
【问题描述】:
我遇到了错误:Generating code coverage report in Clover XML format ... 致命错误:Cannot redeclare preprocessGrammar()(之前在 /app/vendor/nikic/php-parser/grammar/phpyLang. php:22) 在 /app/vendor/nikic/php-parser/grammar/phpyLang.php 第 22 行
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
bootstrap="vendor/autoload.php"
cacheResultFile=".phpunit.cache/test-results">
<testsuites>
<testsuite name="default">
<directory>tests</directory>
</testsuite>
</testsuites>
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">.</directory>
</include>
<report>
<clover outputFile="phpunit.coverage.xml"/>
</report>
</coverage>
<logging>
<junit outputFile="phpunit.report.xml"/>
</logging>
</phpunit>
只有在使用测试覆盖率时才会出现此错误。
【问题讨论】:
标签: php phpunit code-coverage test-coverage