Installing phpunit with a pear didn't work for me at all.
What I finally did (in some directory, for example / home / USERNAME / phpunit ):
wget http://pear.phpunit.de/get/phpunit.phar chmod +x phpunit.phar
And in .bash.rc add the end
export PATH=${PATH}:PATH_WHERE_YOU_PUT_phpunit.phar
In my example, PATH_WHERE_YOU_PUT_phpunit.phar will be / home / USERNAME / phpunit
After that, phpunit can be executed with the phpunit.phar command in any directory
Igor
source share