Tests: Set network_id
instead of site_id
in WP_UnitTest_Factory_For_Blog
defaults.
Follow-up to [47011], [47013]. See #47195. git-svn-id: https://develop.svn.wordpress.org/trunk@47014 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
93eeb8f1d7
commit
079580a6b7
@ -16,10 +16,10 @@ class WP_UnitTest_Factory_For_Blog extends WP_UnitTest_Factory_For_Thing {
|
|||||||
global $current_site, $base;
|
global $current_site, $base;
|
||||||
parent::__construct( $factory );
|
parent::__construct( $factory );
|
||||||
$this->default_generation_definitions = array(
|
$this->default_generation_definitions = array(
|
||||||
'domain' => $current_site->domain,
|
'domain' => $current_site->domain,
|
||||||
'path' => new WP_UnitTest_Generator_Sequence( $base . 'testpath%s' ),
|
'path' => new WP_UnitTest_Generator_Sequence( $base . 'testpath%s' ),
|
||||||
'title' => new WP_UnitTest_Generator_Sequence( 'Site %s' ),
|
'title' => new WP_UnitTest_Generator_Sequence( 'Site %s' ),
|
||||||
'site_id' => $current_site->id,
|
'network_id' => $current_site->id,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -34,7 +34,7 @@ class WP_UnitTest_Factory_For_Blog extends WP_UnitTest_Factory_For_Thing {
|
|||||||
global $wpdb;
|
global $wpdb;
|
||||||
|
|
||||||
// Map some arguments for backward compatibility with `wpmu_create_blog()` previously used here.
|
// Map some arguments for backward compatibility with `wpmu_create_blog()` previously used here.
|
||||||
if ( ! isset( $args['network_id'] ) && isset( $args['site_id'] ) ) {
|
if ( isset( $args['site_id'] ) ) {
|
||||||
$args['network_id'] = $args['site_id'];
|
$args['network_id'] = $args['site_id'];
|
||||||
unset( $args['site_id'] );
|
unset( $args['site_id'] );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user