WordPress.org

Make WordPress Core

Ticket #47195: 47195.diff

File 47195.diff, 891 bytes (added by davidbaumwald, 6 months ago)

Patch

  • tests/phpunit/includes/factory/class-wp-unittest-factory-for-blog.php

    diff --git a/tests/phpunit/includes/factory/class-wp-unittest-factory-for-blog.php b/tests/phpunit/includes/factory/class-wp-unittest-factory-for-blog.php
    index 68d24d30bb..4e3ca02707 100644
    a b class WP_UnitTest_Factory_For_Blog extends WP_UnitTest_Factory_For_Thing { 
    3636                $user_id = isset( $args['user_id'] ) ? $args['user_id'] : get_current_user_id();
    3737                // temp tables will trigger db errors when we attempt to reference them as new temp tables
    3838                $suppress = $wpdb->suppress_errors();
    39                 $blog     = wpmu_create_blog( $args['domain'], $args['path'], $args['title'], $user_id, $meta, $args['site_id'] );
     39                $blog     = wp_insert_site( $args );
    4040                $wpdb->suppress_errors( $suppress );
    4141
    4242                // Tell WP we're done installing.