Make WordPress Core


Ignore:
Timestamp:
04/22/2017 06:58:46 PM (10 years ago)
Author:
johnbillion
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/rest-api/rest-users-controller.php

    r40378 r40520  
    993993        }
    994994
     995        /**
     996         * @group ms-required
     997         */
    995998        public function test_create_new_network_user_on_site_does_not_add_user_to_sub_site() {
    996999                if ( ! is_multisite() ) {
    … …  
    10221025        }
    10231026
     1027        /**
     1028         * @group ms-required
     1029         */
    10241030        public function test_create_new_network_user_on_sub_site_adds_user_to_site() {
    10251031                if ( ! is_multisite() ) {
    … …  
    10551061        }
    10561062
     1063        /**
     1064         * @group ms-required
     1065         */
    10571066        public function test_create_existing_network_user_on_sub_site_has_error() {
    10581067                if ( ! is_multisite() ) {
    … …  
    14421451        }
    14431452
     1453        /**
     1454         * @group ms-excluded
     1455         */
    14441456        public function test_update_user_role_invalid_privilege_deescalation() {
    14451457                if ( is_multisite() ) {
    … …  
    14721484        }
    14731485
     1486        /**
     1487         * @group ms-required
     1488         */
    14741489        public function test_update_user_role_privilege_deescalation_multisite() {
    14751490                if ( ! is_multisite() ) {
    … …  
    22212236        /**
    22222237         * @ticket 39701
     2238         * @group ms-required
    22232239         */
    22242240        public function test_get_item_from_different_site_as_site_administrator() {
    … …  
    22422258        /**
    22432259         * @ticket 39701
     2260         * @group ms-required
    22442261         */
    22452262        public function test_get_item_from_different_site_as_network_administrator() {
    … …  
    22632280        /**
    22642281         * @ticket 39701
     2282         * @group ms-required
    22652283         */
    22662284        public function test_update_item_from_different_site_as_site_administrator() {
    … …  
    22862304        /**
    22872305         * @ticket 39701
     2306         * @group ms-required
    22882307         */
    22892308        public function test_update_item_from_different_site_as_network_administrator() {
    … …  
    23092328        /**
    23102329         * @ticket 39701
     2330         * @group ms-required
    23112331         */
    23122332        public function test_delete_item_from_different_site_as_site_administrator() {
    … …  
    23322352        /**
    23332353         * @ticket 39701
     2354         * @group ms-required
    23342355         */
    23352356        public function test_delete_item_from_different_site_as_network_administrator() {
Note: See TracChangeset for help on using the changeset viewer.