How to run phpunit command on windows command line no matter what directory i work in?

all the phpunit examples I've seen run a simple command line tool:

phpunit TestClass

but when I try to do the same in a directory other than xampp php, I get an "unknown command ..."

Is there a way to execute the phpunit command from any directory on a windows command prompt?

+5
source share
1 answer

Add phpunit to your system PATH

Windows Start β†’ β†’ β†’ " ", , PATH . "" PATH, PATH. PATH, PATH . . phpunit TestClass

+9

All Articles