How to install PHPUnit with WAMP?

前端 未结 5 2178
情深已故
情深已故 2021-02-07 14:32

I\'m a newbie programmer and I have tried for an embarrassingly long time to get PHPUnit set up and working with WAMP. I have read the documentation and went through various sit

5条回答
  •  忘掉有多难
    2021-02-07 14:57

    I recommend using composer. It can be used per project, but also 'globally'.

    Make a folder on your C drive called 'globalpackages', then cd into it from the command line.

    run 'composer require phpunit/phpunit'

    once that finishes run 'composer install'

    once that finishes you can check the contents of C:\globalpackages\vendor\phpunit' and should see two phpunit files, one of them a bat.

    Add C:\globalpackages\vendor\phpunit to your system path and then you will be able to run phpuni from anywhere on your system.

提交回复
热议问题