- Timestamp:
- 11/30/2017 11:09:33 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/factory/class-wp-unittest-factory-for-blog.php
r40968 r42343 17 17 parent::__construct( $factory ); 18 18 $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' ),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 22 'site_id' => $current_site->id, 23 23 ); … … 26 26 function create_object( $args ) { 27 27 global $wpdb; 28 $meta = isset( $args['meta'] ) ? $args['meta'] : array( 'public' => 1 );28 $meta = isset( $args['meta'] ) ? $args['meta'] : array( 'public' => 1 ); 29 29 $user_id = isset( $args['user_id'] ) ? $args['user_id'] : get_current_user_id(); 30 30 // temp tables will trigger db errors when we attempt to reference them as new temp tables 31 31 $suppress = $wpdb->suppress_errors(); 32 $blog = wpmu_create_blog( $args['domain'], $args['path'], $args['title'], $user_id, $meta, $args['site_id'] );32 $blog = wpmu_create_blog( $args['domain'], $args['path'], $args['title'], $user_id, $meta, $args['site_id'] ); 33 33 $wpdb->suppress_errors( $suppress ); 34 34
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)