试图决定哪一个更适合我的情况。根据phpunit文档(这是非常有限的),白名单应该包括目录内的所有文件,但它似乎并没有这样工作。有没有人有任何建议,或可以指向我一个很好的参考,而不是phpunit手册。我正在使用XML配置文件。提前致谢!phpunit白名单vs黑名单
<?xml version="1.0" encoding="utf-8"?>
<phpunit>
<filter>
<whitelist>
<directory suffix=".php">/home/ddohr/git/project/</directory>
<exclude>
<directory suffix=".php">/home/ddohr/git/project/vendor/</directory>
<directory suffix=".php">/home/ddohr/git/project/plugins/</directory>
<directory suffix=".php">/home/ddohr/git/project/test/</directory>
</exclude>
</whitelist>
</filter>
</phpunit>
它的工作原理是这样的我:我现在使用XML文件(https://github.com/ircmaxell/PHP-CryptLib/blob/master /test/phpunit.xml.dist) – ircmaxell 2011-05-03 14:56:10
排除白名单上的文件或目录意味着如果任何文件“触及”它,它将仍然被拉入,它只是不会自动将所有文件拉入?我的白名单目录中有大量文件似乎并未被拉入。 – Dave 2011-05-03 14:58:38
@dave:哪里是PHPUnit根标记? testsuites标签在哪里?编辑您的问题以发布您的完整XML文件... – ircmaxell 2011-05-03 15:00:50