From 4fa7fd759a6f6edb0606c2331b4d495c4ac6bea8 Mon Sep 17 00:00:00 2001 From: Andreas Schamberger Date: Sat, 24 Aug 2013 08:24:31 +0200 Subject: [PATCH] add phpwebserver to travis --- .travis.yml | 1 + src/BeSimple/SoapClient/Tests/bin/phpwebserver.sh | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/.travis.yml b/.travis.yml index 7604e9c..d1cfc26 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,3 +8,4 @@ php: before_script: - curl -s http://getcomposer.org/installer | php - php composer.phar install --dev --prefer-source + - ./src/BeSimple/SoapClient/Tests/bin/phpwebserver.sh diff --git a/src/BeSimple/SoapClient/Tests/bin/phpwebserver.sh b/src/BeSimple/SoapClient/Tests/bin/phpwebserver.sh index 682f802..0d07b8e 100644 --- a/src/BeSimple/SoapClient/Tests/bin/phpwebserver.sh +++ b/src/BeSimple/SoapClient/Tests/bin/phpwebserver.sh @@ -1,5 +1,12 @@ #!/bin/bash +PHPWEBSERVEROK="$( php -r "if (version_compare(phpversion(), '5.4', '<')) { echo 'nok'; } else { echo 'ok'; }" )" + +if [ "$PHPWEBSERVEROK" != "ok" ]; then + echo "No PHP webserver available before version 5.4..." + exit +fi + DIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd $DIR