How to install phpunit?
I read documentation https://github.com/sebastianbergmann/phpunit, but have an error:
>pear upgrade PEAR
Nothing to upgrade
>pear config-set auto_discover 1
config-set succeeded
>pear install pear.phpunit.de/PHPUnit
No releases available for package "pear.phpunit.de/PHPUnit"
install failed
How can I fix this error?
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:
Update 2019: it should be installed as a local (for your project) development package:
Update 2020: it should be installed as a local (for your project) development package: composer require --dev phpunit/phpunit ^9.3