|
@@ 1024-1040 (lines=17) @@
|
| 1021 |
|
* |
| 1022 |
|
* @group xmlrpc |
| 1023 |
|
*/ |
| 1024 |
|
public function test_classic_xmlrpc_when_not_active_and_not_signed() { |
| 1025 |
|
$this->mocked_setup_xmlrpc_handlers( array( 'for' => 'jetpack' ), false, false ); |
| 1026 |
|
|
| 1027 |
|
$methods = apply_filters( 'xmlrpc_methods', array( 'test.test' => '__return_true' ) ); |
| 1028 |
|
|
| 1029 |
|
$required = array( |
| 1030 |
|
'jetpack.remoteAuthorize', |
| 1031 |
|
'jetpack.remoteRegister', |
| 1032 |
|
|
| 1033 |
|
'jetpack.verifyRegistration', |
| 1034 |
|
); |
| 1035 |
|
|
| 1036 |
|
// Nothing else is allowed. |
| 1037 |
|
$allowed = array(); |
| 1038 |
|
|
| 1039 |
|
$this->assertXMLRPCMethodsComply( $required, $allowed, array_keys( $methods ) ); |
| 1040 |
|
} |
| 1041 |
|
|
| 1042 |
|
/** |
| 1043 |
|
* Tests the setup of the xmlrpc methods when the site is not active and the request is signed. |
|
@@ 1047-1063 (lines=17) @@
|
| 1044 |
|
* |
| 1045 |
|
* @group xmlrpc |
| 1046 |
|
*/ |
| 1047 |
|
public function test_classic_xmlrpc_when_not_active_and_signed() { |
| 1048 |
|
$this->mocked_setup_xmlrpc_handlers( array( 'for' => 'jetpack' ), false, true ); |
| 1049 |
|
|
| 1050 |
|
$methods = apply_filters( 'xmlrpc_methods', array( 'test.test' => '__return_true' ) ); |
| 1051 |
|
|
| 1052 |
|
$required = array( |
| 1053 |
|
'jetpack.remoteRegister', |
| 1054 |
|
'jetpack.remoteProvision', |
| 1055 |
|
'jetpack.remoteConnect', |
| 1056 |
|
'jetpack.getUser', |
| 1057 |
|
); |
| 1058 |
|
|
| 1059 |
|
// Nothing else is allowed. |
| 1060 |
|
$allowed = array(); |
| 1061 |
|
|
| 1062 |
|
$this->assertXMLRPCMethodsComply( $required, $allowed, array_keys( $methods ) ); |
| 1063 |
|
} |
| 1064 |
|
|
| 1065 |
|
/** |
| 1066 |
|
* Test "wp_getOptions_hook_in_place". |