Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 463-476 (lines=14) @@
460
		$this->assertTrue( empty( $events ) );
461
	}
462
463
	function test_full_sync_sends_all_functions() {
464
		Modules::get_module( "functions" )->set_callable_whitelist( array( 'jetpack_foo' => 'jetpack_foo_full_sync_callable' ) );
465
		$this->sender->do_sync();
466
467
		// reset the storage, check value, and do full sync - storage should be set!
468
		$this->server_replica_storage->reset();
469
470
		$this->assertEquals( null, $this->server_replica_storage->get_callable( 'jetpack_foo' ) );
471
472
		$this->full_sync->start();
473
		$this->sender->do_full_sync();
474
475
		$this->assertEquals( 'the value', $this->server_replica_storage->get_callable( 'jetpack_foo' ) );
476
	}
477
478
	function test_full_sync_sends_all_functions_inverse() {
479
		Modules::get_module( "functions" )->set_callable_whitelist( array( 'jetpack_foo' => 'jetpack_foo_full_sync_callable' ) );

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

@@ 641-654 (lines=14) @@
638
		$this->assertTrue( empty( $events ) );
639
	}
640
641
	function test_full_sync_sends_all_functions() {
642
		Modules::get_module( "functions" )->set_callable_whitelist( array( 'jetpack_foo' => 'jetpack_foo_full_sync_callable' ) );
643
		$this->sender->do_sync();
644
645
		// reset the storage, check value, and do full sync - storage should be set!
646
		$this->server_replica_storage->reset();
647
648
		$this->assertEquals( null, $this->server_replica_storage->get_callable( 'jetpack_foo' ) );
649
650
		$this->full_sync->start();
651
		$this->sender->do_full_sync();
652
653
		$this->assertEquals( 'the value', $this->server_replica_storage->get_callable( 'jetpack_foo' ) );
654
	}
655
656
	function test_full_sync_sends_all_functions_inverse() {
657
		Modules::get_module( "functions" )->set_callable_whitelist( array( 'jetpack_foo' => 'jetpack_foo_full_sync_callable' ) );