Code Duplication    Length = 6-6 lines in 4 locations

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

@@ 1312-1317 (lines=6) @@
1309
	/**
1310
	 * Verify that get_object_by_id returns a allowed option
1311
	 */
1312
	public function test_get_objects_by_id_singular() {
1313
		$module       = Modules::get_module( 'functions' );
1314
		$callables    = $module->get_all_callables();
1315
		$get_callable = $module->get_objects_by_id( 'callable', array( 'has_file_system_write_access' ) );
1316
		$this->assertEquals( $callables['has_file_system_write_access'], $get_callable['has_file_system_write_access'] );
1317
	}
1318
1319
	/**
1320
	 * Reorder the get_plugins array keys.

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

@@ 90-95 (lines=6) @@
87
	/**
88
	 * Verify that get_object_by_id returns a allowed constant.
89
	 */
90
	public function test_get_objects_by_id_singular() {
91
		$module        = Modules::get_module( 'constants' );
92
		$constants     = $module->get_all_constants();
93
		$get_constants = $module->get_objects_by_id( 'constant', array( 'EMPTY_TRASH_DAYS' ) );
94
		$this->assertEquals( $constants['EMPTY_TRASH_DAYS'], $get_constants['EMPTY_TRASH_DAYS'] );
95
	}
96
97
}
98

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

@@ 316-321 (lines=6) @@
313
	/**
314
	 * Verify that get_object_by_id returns a allowed option
315
	 */
316
	public function test_get_objects_by_id_singular() {
317
		$module      = Modules::get_module( 'options' );
318
		$options     = $module->get_all_options();
319
		$get_options = $module->get_objects_by_id( 'option', array( 'test_option' ) );
320
		$this->assertEquals( $options['test_option'], $get_options['test_option'] );
321
	}
322
}
323

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

@@ 294-299 (lines=6) @@
291
	/**
292
	 * Verify that get_object_by_id returns an allowed update.
293
	 */
294
	public function test_get_objects_by_id_singular() {
295
		$module      = Modules::get_module( 'updates' );
296
		$updates     = $module->get_all_updates();
297
		$get_updates = $module->get_objects_by_id( 'update', array( 'core' ) );
298
		$this->assertEquals( $updates['core'], $get_updates['core'] );
299
	}
300
}
301