Programster's Blog

Tutorials focusing on Linux, programming, and open-source

PHPUnit - Installation

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"

Optional Extras


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"


Last updated: 16th August 2018
First published: 16th August 2018