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
This commit is contained in:
Gary Pendergast
2019-08-19 02:17:50 +00:00
parent 9260916964
commit 4e0499e5bf
3 changed files with 5 additions and 1 deletions

View File

@@ -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 <exclude> 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 &&

View File

@@ -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() {

View File

@@ -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() {