Code Duplication    Length = 17-17 lines in 2 locations

projects/plugins/jetpack/tests/php/sync/test_class.jetpack-sync-full-immediately.php 1 location

@@ 647-663 (lines=17) @@
644
		$this->assertEquals( 'foo5', $this->server_replica_storage->get_metadata( 'post', $post_id, 'a_public_meta', true ) );
645
	}
646
647
	function test_full_sync_sends_all_post_terms() {
648
		$post_id = $this->factory->post->create();
649
		wp_set_object_terms( $post_id, 'tag', 'post_tag' );
650
651
		$this->sender->do_sync();
652
		$terms = get_the_terms( $post_id, 'post_tag' );
653
654
		$this->assertEqualsObject( $terms, $this->server_replica_storage->get_the_terms( $post_id, 'post_tag' ), 'Initial sync doesn\'t work' );
655
		// reset the storage, check value, and do full sync - storage should be set!
656
		$this->server_replica_storage->reset();
657
658
		$this->assertEquals( null, $this->server_replica_storage->get_the_terms( $post_id, 'post_tag', 'Not empty' ) );
659
		$this->full_sync->start();
660
		$this->sender->do_full_sync();
661
662
		$this->assertEqualsObject( $terms, $this->server_replica_storage->get_the_terms( $post_id, 'post_tag' ), 'Full sync doesn\'t work' );
663
	}
664
665
	function test_full_sync_sends_all_comment_meta() {
666
		$post_id     = $this->factory->post->create();

projects/plugins/jetpack/tests/php/sync/test_class.jetpack-sync-full.php 1 location

@@ 815-831 (lines=17) @@
812
		$this->assertEquals( 'foo5', $this->server_replica_storage->get_metadata( 'post', $post_id, 'a_public_meta', true ) );
813
	}
814
815
	function test_full_sync_sends_all_post_terms() {
816
		$post_id = $this->factory->post->create();
817
		wp_set_object_terms( $post_id, 'tag', 'post_tag' );
818
819
		$this->sender->do_sync();
820
		$terms = get_the_terms( $post_id, 'post_tag' );
821
822
		$this->assertEqualsObject( $terms, $this->server_replica_storage->get_the_terms( $post_id, 'post_tag' ), 'Initial sync doesn\'t work' );
823
		// reset the storage, check value, and do full sync - storage should be set!
824
		$this->server_replica_storage->reset();
825
826
		$this->assertEquals( null, $this->server_replica_storage->get_the_terms( $post_id, 'post_tag', 'Not empty' ) );
827
		$this->full_sync->start();
828
		$this->sender->do_full_sync();
829
830
		$this->assertEqualsObject( $terms, $this->server_replica_storage->get_the_terms( $post_id, 'post_tag' ), 'Full sync doesn\'t work' );
831
	}
832
833
	function test_full_sync_sends_all_comment_meta() {
834
		$post_id     = $this->factory->post->create();