windows下的phpunit安裝

Windows

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

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

  2. Append ;C:\bin to your PATH environment variable (related help)windows

  3. Download https://phar.phpunit.de/phpunit.phar and save the file as C:\bin\phpunit.pharapp

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

  5. Create a wrapping batch script (results in C:\bin\phpunit.cmd):spa

     
        C:\Users\username>cd C:\binC:\bin>echo @php "%~dp0phpunit.phar" %* > phpunit.cmdC:\bin>exit
  6. Open a new command line and confirm that you can execute PHPUnit from any path:code

     
    C:\Users\username>phpunit --versionPHPUnit x.y.z by Sebastian Bergmann and contributors.
相關文章
相關標籤/搜索