Code Duplication    Length = 7-8 lines in 3 locations

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

@@ 50-57 (lines=8) @@
47
		set_current_screen( 'post-user' ); // this only works in is_admin()
48
	}
49
50
	function test_white_listed_function_is_synced() {
51
		$this->callable_module->set_callable_whitelist( array( 'jetpack_foo' => 'jetpack_foo_is_callable' ) );
52
53
		$this->sender->do_sync();
54
55
		$synced_value = $this->server_replica_storage->get_callable( 'jetpack_foo' );
56
		$this->assertEquals( jetpack_foo_is_callable(), $synced_value );
57
	}
58
59
	/**
60
	 * Verify that when a callable returns an anonymous function we don't fatal.
@@ 62-69 (lines=8) @@
59
	/**
60
	 * Verify that when a callable returns an anonymous function we don't fatal.
61
	 */
62
	public function test_anonymous_function_callable() {
63
		$this->callable_module->set_callable_whitelist( array( 'jetpack_foo_anon' => 'jetpack_foo_is_anon_callable' ) );
64
65
		$this->sender->do_sync();
66
67
		$synced_value = $this->server_replica_storage->get_callable( 'jetpack_foo_anon' );
68
		$this->assertEquals( null, $synced_value );
69
	}
70
71
	public function test_sync_jetpack_updates() {
72
		$this->sender->do_sync();
@@ 1174-1180 (lines=7) @@
1171
	/**
1172
	 * Test "sync_callable_recursive_gets_checksum".
1173
	 */
1174
	public function test_sync_callable_recursive_gets_checksum() {
1175
1176
		$this->callable_module->set_callable_whitelist( array( 'jetpack_banana' => 'jetpack_recursive_banana' ) );
1177
		$this->sender->do_sync();
1178
		$synced_value = $this->server_replica_storage->get_callable( 'jetpack_banana' );
1179
		$this->assertTrue( ! empty( $synced_value ), 'We couldn\'t synced a value!' );
1180
	}
1181
1182
	/**
1183
	 * Test get_hosting_provider() callable to ensure that known hosts have the