PHPUnitをPEARで入れたら怒られる

メンテナンスしようと思って、サーバーのPHPUnitのバージョンを確かめてみたら。

phpunit --version

PHPUnit 4.0.17 by Sebastian Bergmann.

You have installed PHPUnit via PEAR. This installation method is no longer
supported and http://pear.phpunit.de/ will be shut down no later than
December, 31 2014.

Please read http://phpunit.de/manual/current/en/installation.html and
learn how to use PHPUnit from a PHAR or install it via Composer.

PHPUnitPEARで入れたの?もうそれ、使えないよ?

みたいに言われた。。。

おぉ、

ということで、丁寧に記述されている通りのPHPUnitの本家サイトを覗いてみた。

http://phpunit.de/manual/current/en/installation.html

そしたら、簡単にできました。
以下サイトに書いてある通りのコマンド。

wget https://phar.phpunit.de/phpunit.phar
chmod +x phpunit.phar
mv phpunit.phar /usr/local/bin/phpunit

phpunit --version
PHPUnit 4.1.2 by Sebastian Bergmann.