在Mac OS X 10.9(Mavericks)中无法从命令行执行Phpunit

I've read lots and lots of guides on how to install PHPUnit. I have gotten as far as installing PHPUnit itself plus its dependencies (and some extra packages like PHP_Invoker). However, when I type phpunit on the command-line, bash tells me that it couldn't find anything.

I have looked at questions asked previously on here, but the locations seem to be different; even though installation is okay, for example, I find nothing about phpunit under /usr/lib/php/. However, the files are fine under ~/pear/share/pear/PHPUnit, and everything seems to be downloaded.

My problem is running phpunit from the command line to run my tests. Is there something I'm missing?

It seems you installed PEAR locally for your user, not system wide.

Now you can either install it system wide (doing all the work again), or simply add the PEAR bin directory to your $PATH environment variable:

PATH=$PATH:~/pear/share/bin/

Then phpunit will be executable without the path.

To find the full path, run

$ pear list-files phpunit/phpunit | grep bin

Unfortunately, this question was caused by my mistake. Although pear gave me no errors, for some reason phpunit was not being completely installed (I.E. the ~/pear/bin/phpunit file was not being created).