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..00e222406e 100644
--- a/tests/phpunit/includes/factory/class-wp-unittest-factory-for-blog.php
+++ b/tests/phpunit/includes/factory/class-wp-unittest-factory-for-blog.php
@@ -32,11 +32,29 @@ class WP_UnitTest_Factory_For_Blog extends WP_UnitTest_Factory_For_Thing {
 	 */
 	public function create_object( $args ) {
 		global $wpdb;
-		$meta    = isset( $args['meta'] ) ? $args['meta'] : array( 'public' => 1 );
+
 		$user_id = isset( $args['user_id'] ) ? $args['user_id'] : get_current_user_id();
+		$site_id = isset( $args['site_id'] ) ? $args['site_id'] : 0;
+		$meta 	 = isset( $args['meta'] ) ? $args['meta'] : array( 'public' => 1 );
+
+		$site_data_whitelist 	  = array( 'public', 'archived', 'mature', 'spam', 'deleted', 'lang_id' );
+		$site_data_whitelist_keys = array_flip( $site_data_whitelist );
+
+		$site_data = array_merge(
+			array(
+				'domain'     => $args['domain'],
+				'path'       => $args['path'],
+				'title'   	 => $args['title'],
+				'network_id' => $site_id,
+				'user_id' 	 => $user_id,
+				'options' 	 => array_diff_key( $meta, $site_data_whitelist_keys ),
+			),
+			array_intersect_key( $meta, $site_data_whitelist_keys )
+		);
+
 		// temp tables will trigger db errors when we attempt to reference them as new temp tables
 		$suppress = $wpdb->suppress_errors();
-		$blog     = wpmu_create_blog( $args['domain'], $args['path'], $args['title'], $user_id, $meta, $args['site_id'] );
+		$blog 	  = wp_insert_site( $site_data );
 		$wpdb->suppress_errors( $suppress );
 
 		// Tell WP we're done installing.
