-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'refs/heads/master' into 145-2-do-not-html-encode-json-r…
…esponse
- Loading branch information
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |