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

    r40520 r40543  
    123123     */
    124124    function test_url_to_postid_of_http_site_when_current_site_uses_https() {
    125         if ( ! is_multisite() ) {
    126             $this->markTestSkipped( 'This test requires multisite' );
    127         }
     125        $this->skipWithoutMultisite();
    128126
    129127        $_SERVER['HTTPS'] = 'on';
     
    320318     */
    321319    function test_url_to_postid_ms_home_url_collision() {
    322 
    323         if ( ! is_multisite() ) {
    324             $this->markTestSkipped( 'test_url_to_postid_ms_home_url_collision requires multisite' );
    325         }
     320        $this->skipWithoutMultisite();
    326321
    327322        $blog_id = self::factory()->blog->create( array( 'path' => '/example' ) );
Note: See TracChangeset for help on using the changeset viewer.