Skip to content

Commit

Permalink
allow local phpunit config
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler36 authored Feb 16, 2024
1 parent b53fa84 commit 8b6e2e6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion commands/web/phpunit
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,12 @@ if ! command -v phpunit >/dev/null; then
echo "phpunit is not available. You may need to 'ddev composer install'"
exit 1
fi
phpunit web/modules/custom "$@"

# CHECK for local config.
if [ -f "phpunit.xml" ]; then
# Defer to local config
phpunit "$@"
else
# Bootstrap Drupal tests and run all custom module tests.
phpunit --printer="\Drupal\Tests\Listeners\HtmlOutputPrinter" --bootstrap $PWD/$DDEV_DOCROOT/core/tests/bootstrap.php --testdox $DDEV_DOCROOT/modules/custom "$@"
fi

0 comments on commit 8b6e2e6

Please sign in to comment.