Code Duplication    Length = 8-14 lines in 2 locations

projects/plugins/jetpack/tests/php/general/test-class.jetpack-options.php 1 location

@@ 23-36 (lines=14) @@
20
		return $value;
21
	}
22
23
	function test_delete_non_compact_option_returns_true_when_successfully_deleted() {
24
		Jetpack_Options::update_option( 'migrate_for_idc', true );
25
26
		// Make sure the option is set
27
		$this->assertTrue( Jetpack_Options::get_option( 'migrate_for_idc' ) );
28
29
		$deleted = Jetpack_Options::delete_option( 'migrate_for_idc' );
30
31
		// Was the option successfully deleted?
32
		$this->assertFalse( Jetpack_Options::get_option( 'migrate_for_idc' ) );
33
34
		// Did Jetpack_Options::delete_option() properly return true?
35
		$this->assertTrue( $deleted );
36
	}
37
38
	function test_raw_option_update_will_bypass_wp_cache_and_filters() {
39
		$option_name = 'test_option';

projects/plugins/jetpack/tests/php/general/test_class.jetpack.php 1 location

@@ 474-481 (lines=8) @@
471
		$this->assertFalse( Jetpack_Options::get_option( 'sync_error_idc' ) );
472
	}
473
474
	function test_sync_error_idc_validation_cleans_up_when_part_of_validation_fails() {
475
		$test            = Identity_Crisis::get_sync_error_idc_option();
476
		$test['siteurl'] = 'coolsite.com/wp/';
477
		Jetpack_Options::update_option( 'sync_error_idc', $test );
478
479
		$this->assertFalse( Identity_Crisis::validate_sync_error_idc_option() );
480
		$this->assertFalse( Jetpack_Options::get_option( 'sync_error_idc' ) );
481
	}
482
483
	function test_sync_error_idc_validation_returns_false_and_cleans_up_when_opted_out() {
484
		Jetpack_Options::update_option( 'sync_error_idc', Identity_Crisis::get_sync_error_idc_option() );