Build/Test Tools: Introduce ms-required and ms-excluded groups for tests.

Tests in the `ms-excluded` group are now excluded when running tests with multisite enabled, and tests in the `ms-required` group are excluded when running tests without multisite enabled. The end result is a significantly reduced number of skipped tests polluting PHPUnit's output, which means verbose mode can be used to more easily see which tests are skipped or incomplete, and why.

See #40531


git-svn-id: https://develop.svn.wordpress.org/trunk@40520 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn
2017-04-22 18:58:46 +00:00
parent c717bfbba9
commit 4f8057f7d5
20 changed files with 131 additions and 8 deletions
+2 -3
View File
@@ -119,6 +119,7 @@ class Tests_Rewrite extends WP_UnitTestCase {
/**
* @ticket 35531
* @group multisite
* @group ms-required
*/
function test_url_to_postid_of_http_site_when_current_site_uses_https() {
if ( ! is_multisite() ) {
@@ -315,14 +316,12 @@ class Tests_Rewrite extends WP_UnitTestCase {
/**
* Reveals bug introduced in WP 3.0
*
* Run tests using multisite `phpunit -c multisite`
* @group ms-required
*/
function test_url_to_postid_ms_home_url_collision() {
if ( ! is_multisite() ) {
$this->markTestSkipped( 'test_url_to_postid_ms_home_url_collision requires multisite' );
return false;
}
$blog_id = self::factory()->blog->create( array( 'path' => '/example' ) );