I want to start writing tests for my code, so I installed the latest version of PHPUnit with the following commands
wget http://pear.phpunit.de/get/phpunit.phar chmod +x phpunit.phar mv phpunit.phar /usr/local/bin/phpunit
http://phpunit.de/manual/3.8/en/installation.html
then I added / usr / local / bin to my php.ini include path that looks like
include_path = ".:/Applications/MAMP/bin/php/php5.4.10/lib/php:/usr/local/bin"
but I get the following errors when I visit /my-app/test.php
Warning (2): include (PHPUnit / Autoload.php): stream could not be opened: No such file or directory [CORE / Cake / TestSuite / CakeTestSuiteDispatcher.php, line 150]
Warning (2): include () [function.include]: Error opening 'PHPUnit / Autoload.php' to enable (Include_path = '/ Users / DevinCrossman / Sites / Studios Bliss / Library:.: / Applications / MAMP / bin / PHP / php5.4.10 / Library / PHP: / USR / local / bin ') [CORE / Cake / TestSuite / CakeTestSuiteDispatcher.php, line 150]
I tried changing /usr/local/bin/phpunit to /usr/local/bin/phpunit , but that didn't work. I also tried changing the inclusion path from /usr/local/bin to /usr/local/bin/phpunit and restarted apache (I use MAMP PRO on this computer, but it also did not work on my ubuntu server)
a phpinfo() shows that the enable path is set correctly.
maybe something obvious that i missed. Can someone tell me why this is not working?
source share