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/customize/setting.php

    r40520 r40543  
    565565     */
    566566    function test_previewing_with_switch_to_blog() {
    567         if ( ! is_multisite() ) {
    568             $this->markTestSkipped( 'Cannot test WP_Customize_Setting::is_current_blog_previewed() with switch_to_blog() if not on multisite.' );
    569         }
     567        $this->skipWithoutMultisite();
    570568
    571569        wp_set_current_user( self::factory()->user->create( array( 'role' => 'administrator' ) ) );
Note: See TracChangeset for help on using the changeset viewer.