Code Duplication    Length = 12-13 lines in 2 locations

projects/plugins/jetpack/tests/php/sync/test_class.jetpack-sync-callables.php 2 locations

@@ 633-645 (lines=13) @@
630
		$this->assertEquals( $sanitized->rest_controller_class, 'WP_REST_Terms_Controller' );
631
	}
632
633
	function test_sanitize_sync_post_type_method_default() {
634
		$label = 'foo_default';
635
		$post_type_object = new WP_Post_Type( $label );
636
		$post_type_object->add_supports();
637
		$post_type_object->add_rewrite_rules();
638
		$post_type_object->register_meta_boxes();
639
		$post_type_object->add_hooks();
640
		$post_type_object->register_taxonomies();
641
642
		$sanitized = Functions::sanitize_post_type( $post_type_object );
643
		$this->assert_sanitized_post_type_default( $sanitized, $label );
644
645
	}
646
647
	function test_sanitize_sync_post_type_method_remove_unknown_values_set() {
648
		$label = 'foo_strange';
@@ 647-658 (lines=12) @@
644
645
	}
646
647
	function test_sanitize_sync_post_type_method_remove_unknown_values_set() {
648
		$label = 'foo_strange';
649
		$post_type_object = new WP_Post_Type( $label, array( 'foo' => 'bar' ) );
650
		$post_type_object->add_supports();
651
		$post_type_object->add_rewrite_rules();
652
		$post_type_object->register_meta_boxes();
653
		$post_type_object->add_hooks();
654
		$post_type_object->register_taxonomies();
655
656
		$sanitized = Functions::sanitize_post_type( $post_type_object );
657
		$this->assert_sanitized_post_type_default( $sanitized, $label );
658
	}
659
660
	function assert_sanitized_post_type_default( $sanitized, $label ) {
661
		$this->assertEquals( $label, $sanitized->name );