Code Duplication    Length = 12-13 lines in 2 locations

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

@@ 611-623 (lines=13) @@
608
		$this->assertEquals( $sanitized->rest_controller_class, 'WP_REST_Terms_Controller' );
609
	}
610
611
	function test_sanitize_sync_post_type_method_default() {
612
		$label = 'foo_default';
613
		$post_type_object = new WP_Post_Type( $label );
614
		$post_type_object->add_supports();
615
		$post_type_object->add_rewrite_rules();
616
		$post_type_object->register_meta_boxes();
617
		$post_type_object->add_hooks();
618
		$post_type_object->register_taxonomies();
619
620
		$sanitized = Functions::sanitize_post_type( $post_type_object );
621
		$this->assert_sanitized_post_type_default( $sanitized, $label );
622
623
	}
624
625
	function test_sanitize_sync_post_type_method_remove_unknown_values_set() {
626
		$label = 'foo_strange';
@@ 625-636 (lines=12) @@
622
623
	}
624
625
	function test_sanitize_sync_post_type_method_remove_unknown_values_set() {
626
		$label = 'foo_strange';
627
		$post_type_object = new WP_Post_Type( $label, array( 'foo' => 'bar' ) );
628
		$post_type_object->add_supports();
629
		$post_type_object->add_rewrite_rules();
630
		$post_type_object->register_meta_boxes();
631
		$post_type_object->add_hooks();
632
		$post_type_object->register_taxonomies();
633
634
		$sanitized = Functions::sanitize_post_type( $post_type_object );
635
		$this->assert_sanitized_post_type_default( $sanitized, $label );
636
	}
637
638
	function assert_sanitized_post_type_default( $sanitized, $label ) {
639
		$this->assertEquals( $label, $sanitized->name );