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.
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
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.
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
.
wp-tests-config.php
for your installation.