Skip to content

Commit f8b851d

Browse files
committed
Run unit tests before checking trailing whitespace in php files
1 parent 7ca96aa commit f8b851d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/script.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Check syntax in php files.
22
find . -type "f" -iname "*.php" | xargs -L "1" php -l
33

4+
# Run tests.
5+
cd tests && phpunit --configuration phpunit.xml
6+
47
# Check for trailing whitespace in php files.
58
trailing_whitespace=$(find . -type "f" -iname "*.php" -exec egrep --line-number -H " +$" {} \;)
69
if [[ ! -z "${trailing_whitespace}" ]]; then
710
echo -e "${trailing_whitespace}" | perl -pe 's/^(.*)$/Trailing whitespace found in \1/'
811
exit 1
912
fi
10-
11-
# Run tests.
12-
cd tests && phpunit --configuration phpunit.xml

0 commit comments

Comments
 (0)