From 4e0499e5bf0a7c600f0b78c60c59c14fd71736af Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Mon, 19 Aug 2019 02:17:50 +0000 Subject: [PATCH] Tests: Add an xdebug group for tests that require xdebug. These tests are now also run as their own part of the Travis build, to ensure performance of other tests isn't affected by the presence of xdebug. Fixes #40532. git-svn-id: https://develop.svn.wordpress.org/trunk@45827 602fd350-edb4-49c9-b593-d223f7449a82 --- .travis.yml | 4 +++- tests/phpunit/tests/ajax/Response.php | 1 + tests/phpunit/tests/oembed/headers.php | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 40539c9ab7..4512e5eb1b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -111,7 +111,9 @@ script: npm run test:php -- --verbose -c tests/phpunit/multisite.xml && npm run test:php -- --verbose -c tests/phpunit/multisite.xml --group ms-files && npm run test:php -- --verbose -c phpunit.xml.dist --group external-http && - npm run test:php -- --verbose -c phpunit.xml.dist --group restapi-jsclient + npm run test:php -- --verbose -c phpunit.xml.dist --group restapi-jsclient && + # __fakegroup__ is excluded to force PHPUnit to ignore the settings in phpunit.xml.dist. + LOCAL_PHP_XDEBUG=true npm run test:php -- -v --group xdebug --exclude-group __fakegroup__ elif [[ "$WP_TRAVISCI" == "lint:php" ]]; then docker-compose run --rm php composer format && docker-compose run --rm php composer lint:errors && diff --git a/tests/phpunit/tests/ajax/Response.php b/tests/phpunit/tests/ajax/Response.php index 1ee2eb39ea..83def22b8f 100644 --- a/tests/phpunit/tests/ajax/Response.php +++ b/tests/phpunit/tests/ajax/Response.php @@ -69,6 +69,7 @@ class Tests_Ajax_Response extends WP_UnitTestCase { * @ticket 19448 * @runInSeparateProcess * @preserveGlobalState disabled + * @group xdebug */ public function test_response_charset_in_header() { diff --git a/tests/phpunit/tests/oembed/headers.php b/tests/phpunit/tests/oembed/headers.php index 6fc4ae6800..adc3ff93c2 100644 --- a/tests/phpunit/tests/oembed/headers.php +++ b/tests/phpunit/tests/oembed/headers.php @@ -5,6 +5,7 @@ * @preserveGlobalState disabled * @group oembed * @group oembed-headers + * @group xdebug */ class Tests_oEmbed_HTTP_Headers extends WP_UnitTestCase { function test_rest_pre_serve_request_headers() {