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

    r40520 r40543  
    128128     */
    129129    public function test_numeric_string_user_id() {
    130         if ( is_multisite() ) {
    131             $this->markTestSkipped( 'wp_delete_user() does not delete user records in Multisite.' );
    132         }
     130        $this->skipWithMultisite();
    133131
    134132        $u = self::factory()->user->create();
     
    151149     */
    152150    public function test_should_return_false_for_object_user_id() {
    153         if ( is_multisite() ) {
    154             $this->markTestSkipped( 'wp_delete_user() does not delete user records in Multisite.' );
    155         }
     151        $this->skipWithMultisite();
    156152
    157153        $u_obj = self::factory()->user->create_and_get();
Note: See TracChangeset for help on using the changeset viewer.