Install composer if you haven't already.
Navigate to your project folder, or create a new folder for your project.
Fetch the latest stable version of phpunit through composer.
composer require "phpunit/phpunit"
A utility class for invoking callables with a timeout. This package is required to enforce test timeouts in strict mode.
composer require "phpunit/php-invoker"
Support database interaction testing.
composer require "phpunit/dbunit"
Selenium RC integration for PHPUnit.
composer require "phpunit/phpunit-selenium"