Skip to content

Commit

Permalink
allow local phpunit config (#30)
Browse files Browse the repository at this point in the history
Co-authored-by: Moshe Weitzman <[email protected]>
  • Loading branch information
tyler36 and weitzman authored Feb 22, 2024
1 parent 3c0c821 commit a79cd1d
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 --printer="\Drupal\Tests\Listeners\HtmlOutputPrinter" --bootstrap $PWD/$DDEV_DOCROOT/core/tests/bootstrap.php --testdox $DDEV_DOCROOT/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 a79cd1d

Please sign in to comment.