From 20af3012c2d91488651b37d1cc46f738ce842d69 Mon Sep 17 00:00:00 2001 From: Sean Lang Date: Sun, 6 Mar 2016 22:21:44 -0500 Subject: [PATCH] add basic tests --- .travis.yml | 6 ++++++ composer.json | 3 +++ test.sh | 9 +++++++++ 3 files changed, 18 insertions(+) create mode 100644 .travis.yml create mode 100755 test.sh diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..8fa2459 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,6 @@ +language: php +php: + - '5.4' + - nightly +install: composer install +script: composer test diff --git a/composer.json b/composer.json index b147144..451bb2f 100644 --- a/composer.json +++ b/composer.json @@ -7,5 +7,8 @@ "keywords": ["plugin","wordpress","wp-sync-db","db"], "require": { "composer/installers": "~1.0.6" + }, + "scripts": { + "test": "./test.sh" } } diff --git a/test.sh b/test.sh new file mode 100755 index 0000000..e717455 --- /dev/null +++ b/test.sh @@ -0,0 +1,9 @@ +#!/bin/bash +set -e +set -o pipefail + +files=(wp-sync-db.php class/*.php compatibility/*.php template/*.php); +for file in "${files[@]}" +do + php -l "$file"; +done