When trying to install PHPUnit on Ubuntu 11.10, I received the following error:
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 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
After some serching, I found the answer was to upgrade my version of pear and then reinstall phpUnit using the Pear installer.
The following commands should fix the problem:
1. Upgrade Pear:
sudo pear upgrade PEAR
2. Install PHPUnit:
sudo pear config-set auto discover 1; sudo pear install pear.phpunit.de/PHPUnit
Thanks to the PHPUnit website for the answer.