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