我有我的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