Fix: PHPUnit not working with Git Bash in Windows
If you installed PHPUnit to a Windows machine, but are seeing something like this when running phpunit in Git Bash:
$ phpunit ––version
bash: /c/bin/phpunit: No such file or directory
Then make a duplicate copy of your phpunit.phar file:
C:\bin\phpunit.phar
And rename the copy to:
C:\bin\phpunit
PHPUnit should work fine in Git Bash after that, as well as in Windows cmd or PowerShell.
Note: If you don’t care about running it in Windows cmd or PowerShell, then just rename the original phpunit.phar file to phpunit rather than making a copy.
Source: http://superuser.com/a/944992