Make WordPress Core

Changeset 47014


Ignore:
Timestamp:
12/26/2019 12:25:20 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Tests: Set network_id instead of site_id in WP_UnitTest_Factory_For_Blog defaults.

Follow-up to [47011], [47013].

See #47195.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/factory/class-wp-unittest-factory-for-blog.php

    r47013 r47014  
    1717        parent::__construct( $factory );
    1818        $this->default_generation_definitions = array(
    19             'domain'  => $current_site->domain,
    20             'path'    => new WP_UnitTest_Generator_Sequence( $base . 'testpath%s' ),
    21             'title'   => new WP_UnitTest_Generator_Sequence( 'Site %s' ),
    22             'site_id' => $current_site->id,
     19            'domain'     => $current_site->domain,
     20            'path'       => new WP_UnitTest_Generator_Sequence( $base . 'testpath%s' ),
     21            'title'      => new WP_UnitTest_Generator_Sequence( 'Site %s' ),
     22            'network_id' => $current_site->id,
    2323        );
    2424    }
     
    3535
    3636        // Map some arguments for backward compatibility with `wpmu_create_blog()` previously used here.
    37         if ( ! isset( $args['network_id'] ) && isset( $args['site_id'] ) ) {
     37        if ( isset( $args['site_id'] ) ) {
    3838            $args['network_id'] = $args['site_id'];
    3939            unset( $args['site_id'] );
Note: See TracChangeset for help on using the changeset viewer.