zackkatz / setup-phpunit

Setup PHPUnit for use in Local Lightning

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Setup PHPUnit for Local Lightning

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

Add 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

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.

  • Installs correct version of PHPUnit, with option to specify version.
  • Installs specified version of WordPress and WordPress Test Suite, with option to specify version.
  • Create a correct version of wp-tests-config.php for your installation.
  • Creates a test database.
  • Cleans up afterwards.

About

Setup PHPUnit for use in Local Lightning

License:MIT License


Languages

Language:Shell 100.0%