我有我的PHPUnit安裝和覆蓋率報告工作正常,沒有白名單過濾器。但是,一旦我添加了一個,報告似乎只是部分生成,就好像PHPUnit意外退出一樣。我沒有收到任何錯誤或警告。PHPUnit代碼覆蓋不與配置
我configuratoon看起來是這樣的:
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="./bootstrap.php"
colors="true">
<testsuites>
<testsuite name="...">
<testsuite name="...">
<directory>./path/to/suite</directory>
</testsuite>
<testsuite name="...">
<directory>./path/to/suite2</directory>
</testsuite>
<testsuite name="...">
<directory>./path/to/suite3</directory>
</testsuite>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">../path/to/files</directory>
</whitelist>
</filter>
<logging>
<log type="coverage-html" target="log/" charset="UTF-8" yui="true" />
</logging>
</phpunit>
上有什麼可以去錯了你知道嗎?
是的,在PHP代碼中使用'DIE()'或'EXIT;'將會停止PHPunit覆蓋報告。 – 2011-01-27 16:27:09