Reputation: 771
I am trying to install phpUnit on my MAC 10.8 osx.
However everytime I execute the command phpunit on the terminal, I am getting the following error.: mkothari-nbook:~ mkothari$ phpunit PHP Warning: require_once(File/Iterator/Autoload.php): failed to open stream: No such file or directory in /usr/lib/php/PHPUnit/Autoload.php on line 64 PHP Fatal error: require_once(): Failed opening required 'File/Iterator/Autoload.php' (include_path='.:/php/includes') in /usr/lib/php/PHPUnit/Autoload.php on line 64
I have tried to update the php.ini file with the following paths but none have given me success with the installation:
include_path=".:/usr/local/php/pear/"
;include_path = ".:/usr/lib/php/pear"
;include_path = “.:/usr/lib/php/PHPUnit”
MY phpunit files are located at this location:
php /usr/lib/php/PHPUnit/Util/GlobalState.php
php /usr/lib/php/PHPUnit/Util/InvalidArgumentHelper.php
php /usr/lib/php/PHPUnit/Util/PHP.php
php /usr/lib/php/PHPUnit/Util/Printer.php
php /usr/lib/php/PHPUnit/Util/String.php
php /usr/lib/php/PHPUnit/Util/Test.php
php /usr/lib/php/PHPUnit/Util/TestSuiteIterator.php
php /usr/lib/php/PHPUnit/Util/Type.php`enter code here`
php /usr/lib/php/PHPUnit/Util/XML.php
Can anyone please help
Upvotes: 1
Views: 4331
Reputation: 435
sudo vi which phpunit
After line 38
define('PHPUnit_MAIN_METHOD', 'PHPUnit_TextUI_Command::main');
Add this line
ini_set('include_path', '/usr/lib/php:.');
Upvotes: 1