开发者

PHPUnit error with AddDirectoryToFilter

开发者 https://www.devze.com 2023-01-17 17:03 出处:网络
I am again trying to work on a TDD (Test Driven Design) way. So I installed my PHPUnit again to work with my ZendFramework app开发者_JAVA百科lication.

I am again trying to work on a TDD (Test Driven Design) way. So I installed my PHPUnit again to work with my ZendFramework app开发者_JAVA百科lication. After running my testSuite I get this following error message:

(...)
test:
     [exec] PHP Notice:  Please no longer include "PHPUnit/Framework.php". in /usr/share/php/PHPUnit/Framework.php on line 50
     [exec] PHP Fatal error:  Call to undefined method PHPUnit_Util_Filter::addDirectoryToFilter() in /var/www/nrka2/tests/TestHelper.php on line 99
     [exec] 
     [exec] Fatal error: Call to undefined method PHPUnit_Util_Filter::addDirectoryToFilter() in /var/www/nrka2/tests/TestHelper.php on line 99

BUILD FAILED
/var/www/nrka2/build/build.xml:30: exec returned: 255

In my TestHelper.php I have:

PHPUnit_Util_Filter::addDirectoryToFilter("$foot/tests");
PHPUnit_Util_Filter::addDirectoryToFilter("$foot/library/Zend");

This never lead to any errors. Just now it gives me errors.

I am using the latest version of phpUnit.

Any Idea's / Suggestions?


Check the current documentation for 3.5

http://www.phpunit.de/manual/current/en/appendixes.configuration.html#appendixes.configuration.blacklist-whitelist

They refactored a lot to different packages.

Thus

PHPUnit_Util_Filter::addDirectoryToFilter("$foot/tests");

becomes

PHP_CodeCoverage_Filter::getInstance()->addDirectoryToBlacklist("$foot/tests");

Regards, Markus

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号