I recently installed phpunit on my server via the pear installer.
When I go to run a test I get the following error:
PHP Warning: require_once(PHPUnit/Util/Filter.php): failed to open stream: No such file or directory in /usr/bin/phpunit on line 44
PHP Fatal error: require_once(): Failed opening required 'PHPUnit/Util/Filter.php' (include_path='.:/usr/bin/php') in /usr/bin/phpunit on line 44
After doing some searching, I tried making some modifications to the include_path in my php.ini file on the server. But that hasn't done a thing.
Any idea what might be causing this?
https://bugs.launchpad.net/ubuntu/+source/phpunit/+bug/701544
and specially this comment for ubuntu 11.04 and may be for some others too
even though i did ths steps as recommended above, i didn't get it to work but after i upgraded pear from 1.9.1 to 1.9.2 it's working perfectly just do this
speshu@speshu-laptop:~$ sudo pear upgrade pear
You can solve this issue by redefining the environment variables in PEAR. This is how I solved the problem and I used Ubuntu 12.10
http://rkrants.blogspot.in/2013/01/installing-phpunitpear-in-ubuntu-1210.html
In short it defines the paths and then reinstalls phpunit
https://github.com/sebastianbergmann/php-code-coverage
I was having the same problem. Netbeans was reporting that the phpunit version was too old (which it wasn't). Running the phpunit script directly showed the above messages.
I solved it adding:
To /etc/php5/cli/php.ini
Please NOTE that the php.ini file is the one for php CLI (command) not the php.ini used for apache!
This is also what happens if you have an out-of-date or incomplete PHPUnit install. Please be aware that after you set up PEAR, you must add the PHPUnit.de channel in order to get an up-to-date package.