Install phpunit on windows

后端 未结 5 460
傲寒
傲寒 2020-12-07 13:39

How to install phpunit?

I read documentation https://github.com/sebastianbergmann/phpunit, but have an error:

>pear upgrade PEAR
Nothing to upgrad         


        
5条回答
  •  离开以前
    2020-12-07 14:31

    Old answer (2014): It's said that phpunit will not be available via PEAR since December 2014.
    So it's easy to install it using composer:

    composer global require "phpunit/phpunit=4.1.*"
    

    Update 2019: it should be installed as a local (for your project) development package:

     composer require --dev phpunit/phpunit ^8
    

    Update 2020: it should be installed as a local (for your project) development package: composer require --dev phpunit/phpunit ^9.3

提交回复
热议问题