WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/22/2017 06:58:46 PM (2 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/user/wpAuthenticateSpamCheck.php

    r37316 r40520  
    55 */
    66class Tests_User_WpAuthenticateSpamCheck extends WP_UnitTestCase {
     7
     8    /**
     9     * @group ms-excluded
     10     */
    711    function test_wp_authenticate_spam_check_returns_user_when_single_site() {
    812        if ( is_multisite() ) {
     
    1822    }
    1923
     24    /**
     25     * @group ms-required
     26     */
    2027    function test_wp_authenticate_spam_check_returns_user_when_not_flagged() {
    2128        if ( ! is_multisite() ) {
     
    3138    }
    3239
     40    /**
     41     * @group ms-required
     42     */
    3343    function test_wp_authenticate_spam_check_returns_wp_error_when_flagged() {
    3444        if ( ! is_multisite() ) {
Note: See TracChangeset for help on using the changeset viewer.