Code Duplication    Length = 4-4 lines in 2 locations

tests/phpunit/tests/customize/manager.php 2 locations

@@ 1067-1070 (lines=4) @@
1064
		// Ensure the modifying user set as the current user when each is saved, simulating WP Cron envronment.
1065
		wp_set_current_user( 0 );
1066
		$save_counts = array();
1067
		foreach ( array_keys( $data ) as $setting_id ) {
1068
			$setting_id = preg_replace( '/^.+::/', '', $setting_id );
1069
			$save_counts[ $setting_id ] = did_action( sprintf( 'customize_save_%s', $setting_id ) );
1070
		}
1071
		$this->filtered_setting_current_user_ids = array();
1072
		foreach ( $wp_customize->settings() as $setting ) {
1073
			add_filter( sprintf( 'customize_sanitize_%s', $setting->id ), array( $this, 'filter_customize_setting_to_log_current_user' ), 10, 2 );
@@ 1076-1079 (lines=4) @@
1073
			add_filter( sprintf( 'customize_sanitize_%s', $setting->id ), array( $this, 'filter_customize_setting_to_log_current_user' ), 10, 2 );
1074
		}
1075
		wp_update_post( array( 'ID' => $post_id, 'post_status' => 'publish' ) );
1076
		foreach ( array_keys( $data ) as $setting_id ) {
1077
			$setting_id = preg_replace( '/^.+::/', '', $setting_id );
1078
			$this->assertEquals( $save_counts[ $setting_id ] + 1, did_action( sprintf( 'customize_save_%s', $setting_id ) ), $setting_id );
1079
		}
1080
		$this->assertEqualSets( array( 'blogname', 'blogdescription', 'background_color', 'scratchpad' ), array_keys( $this->filtered_setting_current_user_ids ) );
1081
		$this->assertEquals( $other_admin_user_id, $this->filtered_setting_current_user_ids['blogname'] );
1082
		$this->assertEquals( 0, $this->filtered_setting_current_user_ids['blogdescription'] );