windows下的phpunit安装
Windows
Globally installing the PHAR involves the same procedure as manually installing Composer on Windows:
-
Create a directory for PHP binaries; e.g.,
C:\bin -
Append
;C:\binto yourPATHenvironment variable (related help) -
Download https://phar.phpunit.de/phpunit.phar and save the file as
C:\bin\phpunit.phar -
Open a command line (e.g., press Windows+R » type
cmd» ENTER) -
Create a wrapping batch script (results in
C:\bin\phpunit.cmd):C:\Users\username>cd C:\binC:\bin>echo @php "%~dp0phpunit.phar" %* > phpunit.cmdC:\bin>exit -
Open a new command line and confirm that you can execute PHPUnit from any path:
C:\Users\username>phpunit --versionPHPUnit x.y.z by Sebastian Bergmann and contributors.

浙公网安备 33010602011771号