Skip to content

Commit

Permalink
Allow phpunit to check php syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiosanches committed Feb 11, 2016
1 parent f17f952 commit 3235ba1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
1 change: 1 addition & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
verbose="true"
syntaxCheck="true"
>
<testsuites>
<testsuite name="WooCommerce Test Suite">
Expand Down
1 change: 1 addition & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
verbose="true"
syntaxCheck="true"
>
<testsuites>
<testsuite name="WooCommerce Test Suite">
Expand Down
9 changes: 0 additions & 9 deletions tests/bin/travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,6 @@

if [ $1 == 'before' ]; then

# Lint files
for file in $(find . -name "*.php" -and -not -path "./tmp/*" -and -not -path "./tests/*" -and -not -path "./apigen/*"); do
output=$( php -l $file )
if [[ $output == *"Errors parsing"* ]]; then
echo "Build stopped because of a syntax error: $output";
exit 1;
fi
done

# composer install fails in PHP 5.2
[ $TRAVIS_PHP_VERSION == '5.2' ] && exit;

Expand Down

0 comments on commit 3235ba1

Please sign in to comment.