Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHPUnit could not open input file

I've attempted to install PHPUnit on a windows 2008 server with IIS and I've followed the instructions on the PHPUnit site in terms of manually creating a batch file and setting the environment variable however, when I try checking the installation in CMD.exe

phpunit --version

I'm getting the "Could not open input file: *" error message. However, when I run

php phpunit.phar --version 

it correctly gives me the version number. I need to know what's causing the error incase it's anything i've potentially done during the installation that's caused it. To confirm the directory has been listed within the system path variable.

like image 932
Shamrockonov Avatar asked May 05 '16 10:05

Shamrockonov


2 Answers

Remove the version in the phar filename (ex. from phpunit-5.4.7.phar to phpunit.phar), then the script should run.

like image 177
chip Avatar answered Sep 29 '22 17:09

chip


If you created phpunit.cmd and it still doesn't work, you should just rename phpunit-7.0.2.phar to phpunit.phar, because, by default, it refers to a name phpunit.phar

like image 26
Igor Shumichenko Avatar answered Sep 29 '22 18:09

Igor Shumichenko