views:

38

answers:

1

Hello Everyone,

I am again trying to work on a TDD (Test Driven Design) way. So I installed my PHPUnit again to work with my ZendFramework application. 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?

+1  A: 

Hi,

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

Markus