运行命令phpunit --bootstrap="TestHelper.php" --coverage-clover coverage.xml --whitelist="../../../" --debug --log-junit result.xml ./
它会生成result.xml但是此行后控制台会卡住。 以Clover XML格式生成代码覆盖率报告...
注意:我已经在stackoverflow上检查过上一个队列。
我的phpunit.xml:
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="./TestHelper.php"
backupGlobals="false"
backupStaticAttributes="false"
verbose="true"
colors="false"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="true">
<testsuite name="Phalcon - Testsuite">
<directory>./</directory>
</testsuite>
<filter>
<whitelist processUncoveredFilesFromWhitelist="false">
<directory suffix=".php">../app/repositories/Account</directory>
<directory suffix=".php">../app/repositories/Call</directory>
<directory suffix=".php">../app/repositories/Credit</directory>
<directory suffix=".php">../app/repositories/User</directory>
</whitelist>
</filter>
<logging>
<log type="coverage-clover" target="./coverage.xml"/>
<log type="junit" target="./results.xml" logIncompleteSkipped="false"/>
</logging>
</phpunit>