I ran this command to install globally PHPUnit:
composer global require 'phpunit/phpunit=3.7.*'
To remove a globally installed package run:
composer global remove phpunit/phpunit
global command lets you to run many commands like
update as if you were running them from the
Read the related documentation here: http://getcomposer.org/doc/03-cli.md#global
COMPOSER_HOME depends on your system (on Linux it's usually
~/.config/composer), see http://getcomposer.org/doc/03-cli.md#composer-home for more details.