Then, assuming Composer is already installed
$ curl -sS https://getcomposer.org/installer | php — –install-dir=/usr/local/bin<br />
$ ln -s /usr/local/bin/composer.phar /usr/local/bin/composer<br />
$ composer global require "phpunit/phpunit=4.1.*" $ composer global require "phpunit/php-invoker=~1.1."
next, find the “.composer” directory, mine was in my home directory, and create a symbolic link so we can call it from the command line like so: $phpunit
$ sudo ln -s ~/.composer/vendor/phpunit/phpunit/phpunit /usr/bin/