From bfb932dc304b20173720b83f98b9edfd512900e1 Mon Sep 17 00:00:00 2001 From: Zach Borboa Date: Thu, 23 Apr 2015 15:48:26 -0700 Subject: [PATCH] Fix script.sh exiting with return code 0 when phpunit tests fail --- tests/script.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/script.sh b/tests/script.sh index e9adb35..1736e57 100755 --- a/tests/script.sh +++ b/tests/script.sh @@ -3,6 +3,9 @@ find . -type "f" -iname "*.php" -exec php -l {} \; # Run tests. cd tests && phpunit --configuration phpunit.xml +if [[ "${?}" -ne 0 ]]; then + exit 1 +fi # Enforce line ending consistency in php files. crlf_file=$(find . -type "f" -iname "*.php" -exec grep --files-with-matches $'\r' {} \;)