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/option/siteTransient.php

    r40520 r40543  
    4848     */
    4949    public function test_set_site_transient_is_not_stored_as_autoload_option() {
     50        $this->skipWithMultisite();
     51
    5052        $key = 'not_autoloaded';
    5153
    52         if ( is_multisite() ) {
    53             $this->markTestSkipped( 'Does not apply when used in multisite.' );
    54         }
    5554        set_site_transient( $key, 'Not an autoload option' );
    5655
Note: See TracChangeset for help on using the changeset viewer.