wpveda book

  Edit This Page

phpunit

TODO:

  1. How to use it?

Installation

Follow the below steps to install phpunit on your machine globally:

$ wget https://phar.phpunit.de/phpunit.phar
$ chmod +x phpunit.phar
$ sudo mv phpunit.phar /usr/local/bin/phpunit
$ phpunit --version
PHPUnit x.y.z by Sebastian Bergmann.

Test Matrix

PHP Versions

  1. 5.2
  2. 5.3
  3. 5.4
  4. 5.5
  5. 5.6

WordPress Versions

  1. latest with multisite
  2. latest without multisite
  3. (latest - 1) with multisite
  4. (latest - 1) without multisite

Outcome

phpunit is installed successfully on your machine. You can check it by running following command on terminal.

# This will display the current version of phpunit on your machine.
phpunit --version

References