Code Duplication    Length = 17-17 lines in 2 locations

projects/plugins/jetpack/tests/php/general/test_class.jetpack.php 2 locations

@@ 1116-1132 (lines=17) @@
1113
	 *
1114
	 * @group xmlrpc
1115
	 */
1116
	public function test_classic_xmlrpc_when_not_active_and_not_signed() {
1117
		$this->mocked_setup_xmlrpc_handlers( array( 'for' => 'jetpack' ), false, false );
1118
1119
		$methods = apply_filters( 'xmlrpc_methods', array( 'test.test' => '__return_true' ) );
1120
1121
		$required = array(
1122
			'jetpack.remoteAuthorize',
1123
			'jetpack.remoteRegister',
1124
1125
			'jetpack.verifyRegistration',
1126
		);
1127
1128
		// Nothing else is allowed.
1129
		$allowed = array();
1130
1131
		$this->assertXMLRPCMethodsComply( $required, $allowed, array_keys( $methods ) );
1132
	}
1133
1134
	/**
1135
	 * Tests the setup of the xmlrpc methods when the site is not active and the request is signed.
@@ 1139-1155 (lines=17) @@
1136
	 *
1137
	 * @group xmlrpc
1138
	 */
1139
	public function test_classic_xmlrpc_when_not_active_and_signed() {
1140
		$this->mocked_setup_xmlrpc_handlers( array( 'for' => 'jetpack' ), false, true );
1141
1142
		$methods = apply_filters( 'xmlrpc_methods', array( 'test.test' => '__return_true' ) );
1143
1144
		$required = array(
1145
			'jetpack.remoteRegister',
1146
			'jetpack.remoteProvision',
1147
			'jetpack.remoteConnect',
1148
			'jetpack.getUser',
1149
		);
1150
1151
		// Nothing else is allowed.
1152
		$allowed = array();
1153
1154
		$this->assertXMLRPCMethodsComply( $required, $allowed, array_keys( $methods ) );
1155
	}
1156
1157
	/**
1158
	 * Test "wp_getOptions_hook_in_place".