Skip to content

Commit e972d44

Browse files
authored
Merge pull request #282 from costdev/test_fixes_and_improvements
Various test fixes and improvements
2 parents d5d609b + 9ff8735 commit e972d44

17 files changed

+949
-80
lines changed

composer.json

+32-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"require-dev": {
1717
"squizlabs/php_codesniffer": "3.10.3",
1818
"wp-coding-standards/wpcs": "~3.1.0",
19-
"yoast/phpunit-polyfills": "^1.1.0"
19+
"yoast/phpunit-polyfills": "^1.1.0",
20+
"nimut/phpunit-merger": "^2.0"
2021
},
2122
"config": {
2223
"allow-plugins": {
@@ -32,7 +33,36 @@
3233
],
3334
"test:multisite": [
3435
"Composer\\Config::disableProcessTimeout",
35-
"@php ./vendor/phpunit/phpunit/phpunit -c tests/multisite.xml"
36+
"@php ./vendor/phpunit/phpunit/phpunit -c tests/phpunit/multisite.xml"
37+
],
38+
"coverage:merge": [
39+
"Composer\\Config::disableProcessTimeout",
40+
"@putenv XDEBUG_MODE=coverage",
41+
"@php ./vendor/bin/phpunit-merger coverage tests/phpunit/coverage/php --html tests/phpunit/coverage/html/full tests/phpunit/cache/full-cache.xml"
42+
],
43+
"coverage:single": [
44+
"Composer\\Config::disableProcessTimeout",
45+
"@putenv XDEBUG_MODE=off",
46+
"@putenv WP_TESTS_SKIP_INSTALL=0",
47+
"@test --filter prime_test_suite",
48+
"@putenv XDEBUG_MODE=coverage",
49+
"@putenv WP_TESTS_SKIP_INSTALL=1",
50+
"@test"
51+
],
52+
"coverage:multisite": [
53+
"Composer\\Config::disableProcessTimeout",
54+
"@putenv XDEBUG_MODE=off",
55+
"@putenv WP_TESTS_SKIP_INSTALL=0",
56+
"@test:multisite --filter prime_test_suite",
57+
"@putenv XDEBUG_MODE=coverage",
58+
"@putenv WP_TESTS_SKIP_INSTALL=1",
59+
"@test:multisite"
60+
],
61+
"coverage:full": [
62+
"Composer\\Config::disableProcessTimeout",
63+
"@coverage:single",
64+
"@coverage:multisite",
65+
"@coverage:merge"
3666
]
3767
}
3868
}

0 commit comments

Comments
 (0)