Skip to content

Commit 002fa49

Browse files
committed
[tests] add check on default/overridden INI option 'xdebug.mode'
Signed-off-by: Dorian Savina <[email protected]>
1 parent 1e0d9bc commit 002fa49

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

build-and-test.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,12 @@ set -e
183183
# Let's check that the "xdebug.client_host" contains a value different from "no value"
184184
docker run --rm -e PHP_EXTENSION_XDEBUG=1 thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT} php -i | grep xdebug.client_host| grep -v "no value"
185185

186+
# Let's check that "xdebug.mode" is set to "debug" by default
187+
docker run --rm -e PHP_EXTENSION_XDEBUG=1 thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT} php -i | grep xdebug.mode| grep "debug"
188+
189+
# Let's check that "xdebug.mode" is properly overridden
190+
docker run --rm -e PHP_EXTENSION_XDEBUG=1 -e PHP_INI_XDEBUG__MODE=debug,coverage thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT} php -i | grep xdebug.mode| grep "debug,coverage"
191+
186192
if [[ "${PHP_VERSION}" != "7.4" ]] && [[ "${PHP_VERSION}" != "8.0" ]]; then
187193
# Tests that blackfire + xdebug will output an error
188194
RESULT=`docker run --rm -e PHP_EXTENSION_XDEBUG=1 -e PHP_EXTENSION_BLACKFIRE=1 thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT} php -v 2>&1 | grep 'WARNING: Both Blackfire and Xdebug are enabled. This is not recommended as the PHP engine may not behave as expected. You should strongly consider disabling Xdebug or Blackfire.'`

0 commit comments

Comments
 (0)