Skip to content

Commit 11d0aff

Browse files
committed
Merge branch 'refs/heads/master' into 145-2-do-not-html-encode-json-response
2 parents 13b711f + feeadbc commit 11d0aff

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

.travis.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
language: php
2+
3+
php:
4+
- 5.2
5+
- 5.3
6+
- 5.4
7+
- 5.5
8+
9+
env:
10+
- WP_VERSION=master WP_MULTISITE=0
11+
- WP_VERSION=3.8.1 WP_MULTISITE=0
12+
- WP_VERSION=3.7.1 WP_MULTISITE=0
13+
- WP_VERSION=master WP_MULTISITE=1
14+
15+
before_script:
16+
- export WP_TESTS_DIR=/tmp/wordpress-tests/
17+
- bash bin/install-wp-tests.sh wordpress_test root '' $WP_VERSION
18+
19+
script: phpunit

bin/install-wp-tests.sh

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/usr/bin/env bash
2+
3+
if [ $# -lt 3 ]; then
4+
echo "usage: $0 <db-name> <db-user> <db-pass> [wp-version]"
5+
exit 1
6+
fi
7+
8+
DB_NAME=$1
9+
DB_USER=$2
10+
DB_PASS=$3
11+
WP_VERSION=${4-master}
12+
13+
set -ex
14+
15+
# set up a WP install
16+
WP_CORE_DIR=/tmp/wordpress/
17+
mkdir -p $WP_CORE_DIR
18+
wget -nv -O /tmp/wordpress.tar.gz https://github.com/WordPress/WordPress/tarball/$WP_VERSION
19+
tar --strip-components=1 -zxmf /tmp/wordpress.tar.gz -C $WP_CORE_DIR
20+
21+
# set up testing suite
22+
svn co --ignore-externals https://unit-tests.svn.wordpress.org/trunk/ $WP_TESTS_DIR
23+
24+
cd $WP_TESTS_DIR
25+
cp wp-tests-config-sample.php wp-tests-config.php
26+
sed -i "s:dirname( __FILE__ ) . '/wordpress/':'$WP_CORE_DIR':" wp-tests-config.php
27+
sed -i "s/yourdbnamehere/$DB_NAME/" wp-tests-config.php
28+
sed -i "s/yourusernamehere/$DB_USER/" wp-tests-config.php
29+
sed -i "s/yourpasswordhere/$DB_PASS/" wp-tests-config.php
30+
31+
# create database
32+
mysqladmin create $DB_NAME --user="$DB_USER" --password="$DB_PASS"

0 commit comments

Comments
 (0)