試圖決定哪一個更適合我的情況。根據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