Skip to content

Commit 86b3f9b

Browse files
Use env var for XDEBUG_MODE in unit tests (#4267)
Co-authored-by: daledupreez <[email protected]>
1 parent 7dee991 commit 86b3f9b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bin/run-tests.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ docker compose exec -u www-data wordpress \
99

1010
echo "Running the tests..."
1111

12-
docker compose exec -u www-data -e XDEBUG_MODE=coverage wordpress \
12+
# Use XDEBUG_MODE_PHPUNIT if set, otherwise use "coverage" as default.
13+
XDEBUG_MODE=${XDEBUG_MODE_PHPUNIT:-coverage}
14+
15+
docker compose exec -u www-data -e XDEBUG_MODE=$XDEBUG_MODE wordpress \
1316
/var/www/html/wp-content/plugins/woocommerce-gateway-stripe/vendor/bin/phpunit \
1417
--configuration /var/www/html/wp-content/plugins/woocommerce-gateway-stripe/phpunit.xml.dist \
1518
$*

0 commit comments

Comments
 (0)