2

I have Windows 7, phpunit is installed via these instructions: https://phpunit.de/manual/current/en/installation.html and works fine from regular cmd terminal, but phpunit is not recognized in the windows git bash terminal installed from git-scm.

I'm mainly a linux developer, so setting this stuff up on Windows is a little foreign to me.

AgmLauncher
  • 6,486
  • 5
  • 36
  • 60
  • Sounds like your need to add a path to your environment. See this http://stackoverflow.com/questions/6318156/adding-python-path-on-windows-7 for a similar problem. – Dwayne Towell Dec 24 '14 at 23:52

3 Answers3

1

Use alias native will be much better. edit ~/.bashrc, add these in it:

alias phpunit="php /C/Tools/php/phpunit.phar" // phpunit.phar in C:\Tools\php\phpunit.phar
Alex Chiang
  • 1,670
  • 2
  • 12
  • 20
0

Just run into the same problem myself, see this answer provided at SuperUser https://superuser.com/a/663187, basically the problem is that Git Bash does not run ".bat" files:

Community
  • 1
  • 1
Paul Ngumii
  • 125
  • 1
  • 5
  • 12
0

copy the phpunit.phar file and rename the dumplicate file to phpunit

rename C:\bin\phpunit.phar to C:\bin\phpunit

Fix: PHPUnit not working with Git Bash in Windows

may
  • 1
  • 1
  • Please provide some context for the link. For more information, see ["How do I write a good answer?"](https://meta.stackoverflow.com/help/how-to-answer) in the [Help Center](https://meta.stackoverflow.com/help). – Hugo Elhaj-Lahsen Sep 09 '20 at 12:57