如何在Symfony4中安装phpUnit?

时间:2018-11-03 13:20:49

标签: composer-php symfony4

当我直接用composer req phpunit/phpunit安装phpUnit时,会收到警告消息:

Adding phpunit/phpunit as a dependency is discouraged
in favor of Symfony's PHPUnit Bridge.

  * Instead:
    1. Remove it now: composer remove --dev phpunit/phpunit
    2. Use Symfony's bridge: composer require --dev phpunit

所以我按照消息说的去做,但是在composer require --dev phpunit之后,它安装了symfony/test-pack,后者仅安装了Panther和phpUnit桥,但是phpUnit本身却无处可见。

如何在Symfony4中正确安装phpUnit?

1 个答案:

答案 0 :(得分:1)

好吧,我偶然地运行了vendor/bin/simple-phpunit脚本,事实证明它是在本地下载phpUnit库的。