wp-cli-tests icon indicating copy to clipboard operation
wp-cli-tests copied to clipboard

Conditionally pass Behat `--xdebug` flag

Open swissspidy opened this issue 1 month ago • 1 comments
trafficstars

This logic was previously in the reusable workflow in the wp-cli/.github repo, but in https://github.com/wp-cli/.github/pull/157 I removed it (mostly by accident).

I forgot that wp-cli/wp-cli-bundle runs tests with Behat 3.15 which doesn't know the --xdebug (which is why we had this check in the first place). It's easier to check for WP_CLI_TEST_COVERAGE in this script itself. This makes local testing easier as well, so you only need to run WP_CLI_TEST_COVERAGE=true composer behatand don't need to remember whether you need to pass-- --xdebug` as well or not.

swissspidy avatar Oct 18 '25 19:10 swissspidy