I am following along with the tutorials in 'Easy PHP Websites with Zend Framework' and wanted to install PHPUnit but have been trying to get it to work for about 5 hours now and am at my wits end.
System: Mac OS x Lion, PHP running locally (Not MAMP)
Pear was installed and working fine, I upgraded it to the latest.
Installed PHPUnit using
sudo pear install phpunit/PHPUnit
terminal did some work and installed it without errors
Then in my terminal I did
this returns/does nothing as follows (Username removed)
Machine:~ Username$ phpunit --version
Machine:~ Username$ sudo phpunit --version
Was worried it some how did not install so I check for the PHPUnit files and they do exist under /usr/lib/php/phpunit
Also checked that the phpunit exe exists which it does under /usr/bin
edited .profile as well as .bash_profile to include the /usr/bin path to have
then restarted terminal running
php.ini includes is
include_path = ".:/usr/lib/php/pear:/Library/Server/Web/Data/Sites/ZendFramework-1.11.11/library"
Where xxxxx is my username on the Mac
even going into /usr/bin in terminal and using phpunit --version returns nothing
in case its relevant my PEAR config shows
Configuration (channel pear.php.net):
PEAR executables directory bin_dir /usr/bin
PEAR documentation directory doc_dir /usr/lib/php/doc
PHP extension directory ext_dir /usr/lib/php/extensions/.....
PEAR directory php_dir /usr/lib/php
PEAR data directory data_dir /usr/lib/php/data
PHP CLI/CGI binary php_bin /usr/bin/php
php.ini location php_ini <not set>
PEAR Installer temp directory temp_dir /private/tmp/pear/temp
PEAR test directory test_dir /usr/lib/php/test
PEAR www files directory www_dir /usr/lib/php/htdocs
Also added the pear and phpunit directory to my php.ini includes path list.
I tried running PHPUnit in PHPUnit on AboutControllerTest.php file under my test directory and this gave me:
/usr/bin/php /private/var/folders/wy/nb6s7vlj56v7yyytntdhbr100000gp/T/ide-phpunit.php --bootstrap /Library/Server/Web/Data/Sites/learning/tests/bootstrap.php --configuration /Library/Server/Web/Data/Sites/learning/tests/phpunit.xml AboutControllerTest /Library/Server/Web/Data/Sites/learning/tests/application/controllers/AboutControllerTest.php
Testing started at 7:51 PM ...
Process finished with exit code 1
Cannot find PHPUnit in include path (.:/usr/lib/php/pear:/Library/Server/Web/Data/Sites/ZendFramework-1.11.11/library:/usr/lib/php/PHPUnit:/usr/bin)
Am at a loss as to why this does not want to work. Am sure its me and I have done something incorrectly....Any help appreciated.