I've install phpunit on to my windows subsystem for linux:
wget https://phar.phpunit.de/phpunit-7.1.1.phar
chmod +x phpunit-7.1.1.phar
sudo mv phpunit-7.1.1.phar /usr/local/bin/phpunit
I can see that phpunit exists in /usr/local/bin/phpunit
When I run php phpunit --version
from /usr/local/bin/phpunit
it runs correctly.
However from anywhere else I get the following error:
Could not open input file: phpunit
I also see this error when I run just phpunit --version
-bash: /usr/bin/phpunit: No such file or directory
php /usr/local/bin/phpunit --version
This form works..., actually I have php and phpunit installed via apt and they install into /usr/bin... so I actually used
$ php /usr/bin/phpunit --version
PHPUnit 5.1.3 by Sebastian Bergmann and contributors.