afragen / setup-phpunit

Setup PHPUnit for use in Local Lightning
MIT License
20 stars 6 forks source link

Setup PHPUnit for Local 5.x or greater

This is an updated version of gist setup-phpunit.sh

I converted it to a repository to more easily update it. I couldn't seem to git push to the gist.

Installation

If you use a Mac please install Homebrew using the following command.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

Install the setup-phpunit.sh script using the following.

curl -o setup-phpunit.sh https://raw.githubusercontent.com/afragen/setup-phpunit/master/setup-phpunit.sh

Usage

setup-phpunit.sh is meant to reside in /app and be run from /app/public as bash ../setup-phpunit.sh or from /app as bash setup-phpunit.sh

You must use /usr/local/bin/phpunit for your testing.

What It Does

This is meant as a primary replacement for the install-wp-tests.sh script created from plugin scaffolding with wp scaffold plugin-tests your_plugin.