Skip to content

Instantly share code, notes, and snippets.

@dingo-d
Created June 7, 2018 08:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dingo-d/296beb0580fa5407c38de6606bed7b08 to your computer and use it in GitHub Desktop.
Save dingo-d/296beb0580fa5407c38de6606bed7b08 to your computer and use it in GitHub Desktop.
WordPress Integration Testing info

Unit test example installation

Be sure you have php and mysql installed on your mac/PC

After scaffolding with wp-cli, run

bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 latest

If the database is installed, you can delete it before running this command.

After that phpunit should be working.

The test wp is installed in a temporary folder that looks something like (on mac)

/var/folders/xj/14b3w8w51ll6rw09q72p45cr0000gn/T/wordpress/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment