30
32

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

PHPUnitのインストールが簡単になってる!!

Last updated at Posted at 2015-01-21

一昨年くらいに入れるのに苦労して手順を丁寧にメモっておいたのに、手順通りで入らない!

前の手順はこれ

PEARがなければPEARも入れる・・・

yum install -y php-xml
pear channel-discover pear.phpunit.de
pear channel-discover components.ez.no
pear channel-discover pear.symfony-project.com
pear channel-discover pear.symfony.com
pear install pear.symfony.com/Yaml
pear update-channels
pear upgrade-all
pear clear-cache
pear install -f -a phpunit/PHPUnit
phpunit --version

これだけで終わりだった!

要は公式をちゃんと読めって話で、

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

これで無事完了

追記(2015/12/08)

久しぶりに使ったらエラーでました。

This version of PHPUnit requires PHP 5.6; using the latest version of PHP is highly recommended.

はいそうです。PHPが古いんです。でも以前苦労して作ったDocker環境なので、PHPだけ変えるわけにもいかないんです!何が起きるか分からないんです!

ということで、PHP5.4環境だとPHPUnitの最新版は入らないらしいので、こちらに変更

wget https://phar.phpunit.de/phpunit-old.phar -O phpunit.phar
30
32
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
30
32

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?