Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/05/2018 03:08:17 PM (6 years ago)
Author:
boonebgorges
Message:

Tests: When tearing down test fixtures, use wp_uninitialize_site() if available.

See #7984.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/testcase.php

    r12162 r12242  
    8686            if ( is_multisite() ) {
    8787                foreach ( $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs WHERE blog_id != 1" ) as $blog_id ) {
    88                     wpmu_delete_blog( $blog_id, true );
     88                    if ( function_exists( 'wp_uninitialize_site' ) ) {
     89                        wp_uninitialize_site( $blog_id );
     90                    } else {
     91                        wpmu_delete_blog( $blog_id, true );
     92                    }
    8993                }
    9094            }
Note: See TracChangeset for help on using the changeset viewer.