在PHPUnit中,可以将测试组织成不同的测试套件:
此外,您可以定义筛选器,例如:
<phpunit bootstrap="Bootstrap.php">
<testsuites>
<testsuite name="zf2sandbox">
<directory>./AlbumTest</directory>
</testsuite>
</testsuites>
</phpunit>
此外,您可以定义筛选器,例如:
<filter>
<whitelist>
<directory suffix=".php">/var/www/sandbox/zf2sandbox/module/Album/src/Album/</directory>
</whitelist>
</filter>
现在我想要将这两个特性结合起来。不允许将filter
标签放入testsuite
中(该过滤器会被忽略)。
<phpunit bootstrap="Bootstrap.php">
<testsuites>
<testsuite name="zf2sandbox">
<directory>./AlbumTest</directory>
<filter>
<whitelist>
<directory suffix=".php">/var/www/sandbox/zf2sandbox/module/Album/src/Album/</directory>
</whitelist>
</filter>
</testsuite>
</testsuites>
</phpunit>
是否有其他方法为每个testsuite
定义过滤器(白名单、黑名单等)?