Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.


I've just upgraded to 11.04 and now phpunit isn't working anymore :( (it was working fine on 10.10). Here is what appears in console:

david@david-P55M-UD2:/var/www/magento$ phpunit UnitTests.php 
PHP Warning:  require_once(PHP/CodeCoverage/Filter.php): failed to open stream: No such file or directory in /usr/bin/phpunit on line 38
PHP Stack trace:
PHP   1. {main}() /usr/bin/phpunit:0
PHP Fatal error:  require_once(): Failed opening required 'PHP/CodeCoverage/Filter.php' (include_path='.:/usr/share/php:/usr/share/pear') in /usr/bin/phpunit on line 38
PHP Stack trace:
PHP   1. {main}() /usr/bin/phpunit:0

Any suggestion?

share|improve this question

3 Answers 3

up vote 3 down vote accepted

as seen in SO, this worked for me:

sudo pear channel-discover pear.symfony-project.com
sudo pear channel-discover components.ez.no
sudo pear install --alldeps phpunit/PHPUnit
share|improve this answer

For ubuntu 11.10 use the following :

sudo apt-get install php-pear

sudo pear upgrade pear

sudo pear channel-discover pear.phpunit.de
sudo pear channel-discover components.ez.no
sudo pear channel-discover pear.symfony-project.com

sudo pear install --alldeps phpunit/PHPUnit
share|improve this answer
    
This is the one which worked for me. The current accepted answer didn't (an upgrade to pear was needed). –  Cd-MaN Jan 9 '12 at 16:31

Unfortunately the Debian Package for PHPUnit is broken, it doesn't include several Classes which are necessary for PHPUnit since the Version shipped with Natty:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=610676

So I suggest keeping an eye on it and trying with David's solution.

share|improve this answer
    
thanx for the info Andy, we'll keep an eye on it :) –  OSdave May 11 '11 at 8:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.