summaryrefslogtreecommitdiff
path: root/modules/simpletest/tests/xmlrpc_test.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/simpletest/tests/xmlrpc_test.module')
-rw-r--r--modules/simpletest/tests/xmlrpc_test.module23
1 files changed, 23 insertions, 0 deletions
diff --git a/modules/simpletest/tests/xmlrpc_test.module b/modules/simpletest/tests/xmlrpc_test.module
index 9f06f48ae..f52afe325 100644
--- a/modules/simpletest/tests/xmlrpc_test.module
+++ b/modules/simpletest/tests/xmlrpc_test.module
@@ -64,6 +64,29 @@ function xmlrpc_test_xmlrpc() {
}
/**
+ * Implements hook_xmlrpc_alter().
+ *
+ * Hide (or not) the system.methodSignature() service depending on a variable.
+ */
+function xmlrpc_test_xmlrpc_alter(&$services) {
+ if (variable_get('xmlrpc_test_xmlrpc_alter', FALSE)) {
+ $remove = NULL;
+ foreach ($services as $key => $value) {
+ if (!is_array($value)) {
+ continue;
+ }
+ if ($value[0] == 'system.methodSignature') {
+ $remove = $key;
+ break;
+ }
+ }
+ if (isset($remove)) {
+ unset($services[$remove]);
+ }
+ }
+}
+
+/**
* Created a message of the desired size in KB.
*
* @param $size