Skip to content

Commit

Permalink
FIX Don't use --exclude-filter for PHPUnit 9
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Sep 30, 2024
1 parent a08a8c0 commit 12c4892
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,24 +86,24 @@ runs:
# --verbose option removed in PHPUnit 10, as it's now always verbose
PHPUNIT_OPTIONS="$PHPUNIT_OPTIONS --verbose"
fi
# --display-phpunit-deprecations option added in PHPUnit 11.3.3
# deprecations will display by default in PHPUnit <= 11.3.2
if (( "$INT_VERSION" >= 110303 )); then
# --display-phpunit-deprecations option added in PHPUnit 11.3.3
# deprecations will display by default in PHPUnit <= 11.3.2
PHPUNIT_OPTIONS="$PHPUNIT_OPTIONS --display-phpunit-deprecations"
# Special filtering for silverstripe/framework testsuites (--exclude-filter added in PHPUnit 11)
if [[ "$PHPUNIT_SUITE" == "framework-orm" ]]; then
PHPUNIT_OPTIONS="$PHPUNIT_OPTIONS --filter /ORM/"
fi
if [[ "$PHPUNIT_SUITE" == "framework-core" ]]; then
PHPUNIT_OPTIONS="$PHPUNIT_OPTIONS --exclude-filter /ORM/"
fi
fi
if [[ "$PHPUNIT_SUITE" != "all" ]] && [[ "$PHPUNIT_SUITE" != "" ]]; then
PHPUNIT_OPTIONS="$PHPUNIT_OPTIONS --testsuite "$PHPUNIT_SUITE""
fi
if [[ "${{ inputs.phpunit_fail_on_warning }}" == "true" ]]; then
PHPUNIT_OPTIONS="$PHPUNIT_OPTIONS --fail-on-warning"
fi
# Special filtering for silverstripe/framework testsuites
if [[ "$PHPUNIT_SUITE" == "framework-orm" ]]; then
PHPUNIT_OPTIONS="$PHPUNIT_OPTIONS --filter /ORM/"
fi
if [[ "$PHPUNIT_SUITE" == "framework-core" ]]; then
PHPUNIT_OPTIONS="$PHPUNIT_OPTIONS --exclude-filter /ORM/"
fi
echo "PHPUNIT_OPTIONS is $PHPUNIT_OPTIONS"
vendor/bin/phpunit $PHPUNIT_OPTIONS
echo "Passed"
Expand Down

0 comments on commit 12c4892

Please sign in to comment.