loader spinner

Install PHPUNIT on mac OS X El Capitan

March 10, 2019 12:32pm - 1 min read

phpunit

We first need to install Composer before we install PHPUNIT. There is a tutorial how to install Composer.

Install PHPUnit 4.8 if you are running PHP version 5.

composer global require phpunit/phpunit:4.*

We are explicitly installing 5.x because that’s what WordPress supports when you’re running PHP 7 or above, which I have on my machine.

composer global require phpunit/phpunit:5.*

Run

phpunit --version

to confirm it’s been installed.

Last updated on: March 10, 2019 12:32pm