3


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?

0

3 Answers 3

3

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
2

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
1
  • This is the one which worked for me. The current accepted answer didn't (an upgrade to pear was needed). Jan 9, 2012 at 16:31
1

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.

1
  • thanx for the info Andy, we'll keep an eye on it :)
    – OSdave
    May 11, 2011 at 8:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .