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/functions.php

    r40533 r40543  
    939939     */
    940940    function test_wp_check_filetype_and_ext_with_filtered_svg() {
     941        $this->skipWithMultisite();
     942
    941943        if ( ! extension_loaded( 'fileinfo' ) ) {
    942944            $this->markTestSkipped( 'The fileinfo PHP extension is not loaded.' );
    943         }
    944 
    945         if ( is_multisite() ) {
    946             $this->markTestSkipped( 'Test does not run in multisite' );
    947945        }
    948946
     
    965963    /**
    966964     * @ticket 39550
     965     * @group ms-excluded
    967966     */
    968967    function test_wp_check_filetype_and_ext_with_filtered_woff() {
     968        $this->skipWithMultisite();
     969
    969970        if ( ! extension_loaded( 'fileinfo' ) ) {
    970971            $this->markTestSkipped( 'The fileinfo PHP extension is not loaded.' );
    971         }
    972 
    973         if ( is_multisite() ) {
    974             $this->markTestSkipped( 'Test does not run in multisite' );
    975972        }
    976973
Note: See TracChangeset for help on using the changeset viewer.