Skip to content

Commit

Permalink
Merge branch 'refs/heads/master' into 145-2-do-not-html-encode-json-r…
Browse files Browse the repository at this point in the history
…esponse
  • Loading branch information
mattheu committed Mar 18, 2014
2 parents 13b711f + feeadbc commit 11d0aff
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
language: php

php:
- 5.2
- 5.3
- 5.4
- 5.5

env:
- WP_VERSION=master WP_MULTISITE=0
- WP_VERSION=3.8.1 WP_MULTISITE=0
- WP_VERSION=3.7.1 WP_MULTISITE=0
- WP_VERSION=master WP_MULTISITE=1

before_script:
- export WP_TESTS_DIR=/tmp/wordpress-tests/
- bash bin/install-wp-tests.sh wordpress_test root '' $WP_VERSION

script: phpunit
32 changes: 32 additions & 0 deletions bin/install-wp-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env bash

if [ $# -lt 3 ]; then
echo "usage: $0 <db-name> <db-user> <db-pass> [wp-version]"
exit 1
fi

DB_NAME=$1
DB_USER=$2
DB_PASS=$3
WP_VERSION=${4-master}

set -ex

# set up a WP install
WP_CORE_DIR=/tmp/wordpress/
mkdir -p $WP_CORE_DIR
wget -nv -O /tmp/wordpress.tar.gz https://github.com/WordPress/WordPress/tarball/$WP_VERSION
tar --strip-components=1 -zxmf /tmp/wordpress.tar.gz -C $WP_CORE_DIR

# set up testing suite
svn co --ignore-externals https://unit-tests.svn.wordpress.org/trunk/ $WP_TESTS_DIR

cd $WP_TESTS_DIR
cp wp-tests-config-sample.php wp-tests-config.php
sed -i "s:dirname( __FILE__ ) . '/wordpress/':'$WP_CORE_DIR':" wp-tests-config.php
sed -i "s/yourdbnamehere/$DB_NAME/" wp-tests-config.php
sed -i "s/yourusernamehere/$DB_USER/" wp-tests-config.php
sed -i "s/yourpasswordhere/$DB_PASS/" wp-tests-config.php

# create database
mysqladmin create $DB_NAME --user="$DB_USER" --password="$DB_PASS"

0 comments on commit 11d0aff

Please sign in to comment.