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

PHP_Invoker

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"

DbUnit

Support database interaction testing.

composer require "phpunit/dbunit"

PHPUnit_Selenium

Selenium RC integration for PHPUnit.

composer require "phpunit/phpunit-selenium"

References