Skip to content

Instantly share code, notes, and snippets.

@tareiking
Created September 9, 2014 13:42
Show Gist options
  • Save tareiking/83efc5001352df2472c0 to your computer and use it in GitHub Desktop.
Save tareiking/83efc5001352df2472c0 to your computer and use it in GitHub Desktop.
Theme Test Script
# Installer script for WP CLI and WP Theme testing
#
# @TODO: Add support for getting theme directly from TRAC.svn link which is given
# @TODO: Install pre-requisites
# @TODO: Install as an extension
###
# Install supercharger 'content' directory
git clone --recursive https://github.com/Chassis/Supercharger content
###
# Navigate to the right directory
# @todo This makes a lot of assumptions (supercharger already installed, vagrant/content directory structure)
cd /vagrant/content
###
# Lets install some recommended testing plugins
# src: http://make.wordpress.org/themes/about/how-to-join-wptrt/
wp plugin install theme-check --activate
wp plugin install debug-bar --activate
wp plugin install log-deprecated-notices --activate
wp plugin install monster-widget --activate
wp plugin install wordpress-beta-tester --activate
wp plugin install regenerate-thumbnails --activate
wp plugin install developer --activate
wp plugin install wordpress-importer --activate
###
# Now is a good time to install some test data
# src: https://wpcom-themes.svn.automattic.com/demo/theme-unit-test-data.xml
wget https://wpcom-themes.svn.automattic.com/demo/theme-unit-test-data.xml
wp import theme-unit-test-data.xml --authors=create
rm theme-unit-test-data.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment