WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/23/2017 09:57:31 PM (2 years ago)
Author:
johnbillion
Message:

Build/Test Tools: Introduce skipWithoutMultisite() and skipWithMultisite() methods into the test suite.

This brings much needed uniformity to test skipping when a test requires Multisite or when a test should be excluded from running when Multisite is enabled.

Used in conjunction with the @group ms-required and @group ms-excluded notation, this removes a significant number of skipped tests from the default test suite run.

Fixes #40531

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/user/wpGetUsersWithNoRole.php

    r40522 r40543  
    1111     */
    1212    public function test_get_users_with_no_role_is_accurate() {
    13 
    14         if ( is_multisite() ) {
    15             $this->markTestSkipped( 'Test does not run on multisite' );
    16         }
     13        $this->skipWithMultisite();
    1714
    1815        // Setup users
     
    4643     */
    4744    public function test_get_users_with_no_role_multisite_is_accurate() {
    48 
    49         if ( ! is_multisite() ) {
    50             $this->markTestSkipped( 'Test requires multisite' );
    51         }
     45        $this->skipWithoutMultisite();
    5246
    5347        // Setup users
Note: See TracChangeset for help on using the changeset viewer.