windows下的phpunit安装

Windows

Globally installing the PHAR involves the same procedure as manually installing Composer on Windows:

  1. Create a directory for PHP binaries; e.g., C:in

  2. Append ;C:in to your PATH environment variable (related help)

  3. Download https://phar.phpunit.de/phpunit.phar and save the file as C:inphpunit.phar

  4. Open a command line (e.g., press Windows+R » type cmd » ENTER)

  5. Create a wrapping batch script (results in C:inphpunit.cmd):

    C:Usersusername> cd C:in
    C:in> echo @php "%~dp0phpunit.phar" %* > phpunit.cmd
    C:in> exit
    
  6. Open a new command line and confirm that you can execute PHPUnit from any path:

    C:Usersusername> phpunit --version
    PHPUnit x.y.z by Sebastian Bergmann and contributors.
原文地址:https://www.cnblogs.com/maxomnis/p/5611440.html