Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion commands/web/phpunit
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,13 @@ if ! command -v phpunit >/dev/null; then
fi
echo "Clearing old webdriver sessions"
curl -f -s http://chrome:4444/status | jq -r '.value.nodes[].slots[].session.sessionId' | while read -r session; do if [ "$session" != "null" ]; then curl -X DELETE "http://chrome:4444/session/$session"; fi; done
phpunit -c core "$@"

# Prefer a phpunit.xml file in the project root if one exists; fall back on the
# one in core if not.
if [ ! -f 'phpunit.xml' ]; then
phpunit_c_option="-c core"
else
phpunit_c_option=""
fi

phpunit $phpunit_c_option "$@"