diff --git a/core/modules/xmlrpc/lib/Drupal/xmlrpc/Tests/XmlRpcMessagesTest.php b/core/modules/xmlrpc/lib/Drupal/xmlrpc/Tests/XmlRpcMessagesTest.php index 014c60b..f892505 100644 --- a/core/modules/xmlrpc/lib/Drupal/xmlrpc/Tests/XmlRpcMessagesTest.php +++ b/core/modules/xmlrpc/lib/Drupal/xmlrpc/Tests/XmlRpcMessagesTest.php @@ -47,13 +47,13 @@ function testSizedMessages() { * Ensure that hook_xmlrpc_alter() can hide even builtin methods. */ protected function testAlterListMethods() { - // Ensure xmlrpc_test_xmlrpc_alter() is disabled and retrieve regular list of methods. - variable_set('xmlrpc_test_xmlrpc_alter', FALSE); + // Ensure xmlrpc_test.xmlrpc_alter() is disabled and retrieve regular list of methods. + state()->set('xmlrpc_test.xmlrpc_alter', FALSE); $url = url('xmlrpc.php', array('absolute' => TRUE)); $methods1 = xmlrpc($url, array('system.listMethods' => array())); // Enable the alter hook and retrieve the list of methods again. - variable_set('xmlrpc_test_xmlrpc_alter', TRUE); + state()->set('xmlrpc_test.xmlrpc_alter', TRUE); $methods2 = xmlrpc($url, array('system.listMethods' => array())); $diff = array_diff($methods1, $methods2); diff --git a/core/modules/xmlrpc/tests/modules/xmlrpc_test/xmlrpc_test.module b/core/modules/xmlrpc/tests/modules/xmlrpc_test/xmlrpc_test.module index db8f113..d866f8b 100644 --- a/core/modules/xmlrpc/tests/modules/xmlrpc_test/xmlrpc_test.module +++ b/core/modules/xmlrpc/tests/modules/xmlrpc_test/xmlrpc_test.module @@ -68,7 +68,7 @@ function xmlrpc_test_xmlrpc() { * 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)) { + if (state()->get('xmlrpc_test.xmlrpc_alter')) { $remove = NULL; foreach ($services as $key => $value) { if (!is_array($value)) {