Revert XML-RPC test changes that have already been committed.

8.0.x
effulgentsia 2012-05-26 11:32:55 -05:00 committed by Larry Garfield
parent ab5e316659
commit b02b51cce1
1 changed files with 5 additions and 13 deletions

View File

@ -19,8 +19,6 @@ class XMLRPCBasicTestCase extends WebTestBase {
* Ensure that a basic XML-RPC call with no parameters works. * Ensure that a basic XML-RPC call with no parameters works.
*/ */
protected function testListMethods() { protected function testListMethods() {
global $base_url;
// Minimum list of methods that should be included. // Minimum list of methods that should be included.
$minimum = array( $minimum = array(
'system.multicall', 'system.multicall',
@ -31,7 +29,7 @@ class XMLRPCBasicTestCase extends WebTestBase {
); );
// Invoke XML-RPC call to get list of methods. // Invoke XML-RPC call to get list of methods.
$url = $base_url . '/core/xmlrpc.php'; $url = url(NULL, array('absolute' => TRUE)) . 'core/xmlrpc.php';
$methods = xmlrpc($url, array('system.listMethods' => array())); $methods = xmlrpc($url, array('system.listMethods' => array()));
// Ensure that the minimum methods were found. // Ensure that the minimum methods were found.
@ -49,9 +47,7 @@ class XMLRPCBasicTestCase extends WebTestBase {
* Ensure that system.methodSignature returns an array of signatures. * Ensure that system.methodSignature returns an array of signatures.
*/ */
protected function testMethodSignature() { protected function testMethodSignature() {
global $base_url; $url = url(NULL, array('absolute' => TRUE)) . 'core/xmlrpc.php';
$url = $base_url . '/core/xmlrpc.php';
$signature = xmlrpc($url, array('system.methodSignature' => array('system.listMethods'))); $signature = xmlrpc($url, array('system.methodSignature' => array('system.listMethods')));
$this->assert(is_array($signature) && !empty($signature) && is_array($signature[0]), $this->assert(is_array($signature) && !empty($signature) && is_array($signature[0]),
t('system.methodSignature returns an array of signature arrays.')); t('system.methodSignature returns an array of signature arrays.'));
@ -103,8 +99,7 @@ class XMLRPCValidator1IncTestCase extends WebTestBase {
* Run validator1 tests. * Run validator1 tests.
*/ */
function testValidator1() { function testValidator1() {
global $base_url; $xml_url = url(NULL, array('absolute' => TRUE)) . 'core/xmlrpc.php';
$xml_url = $base_url . '/core/xmlrpc.php';
srand(); srand();
mt_srand(); mt_srand();
@ -218,9 +213,7 @@ class XMLRPCMessagesTestCase extends WebTestBase {
* Make sure that XML-RPC can transfer large messages. * Make sure that XML-RPC can transfer large messages.
*/ */
function testSizedMessages() { function testSizedMessages() {
global $base_url; $xml_url = url(NULL, array('absolute' => TRUE)) . 'core/xmlrpc.php';
$xml_url = $base_url . '/core/xmlrpc.php';
$sizes = array(8, 80, 160); $sizes = array(8, 80, 160);
foreach ($sizes as $size) { foreach ($sizes as $size) {
$xml_message_l = xmlrpc_test_message_sized_in_kb($size); $xml_message_l = xmlrpc_test_message_sized_in_kb($size);
@ -234,11 +227,10 @@ class XMLRPCMessagesTestCase extends WebTestBase {
* Ensure that hook_xmlrpc_alter() can hide even builtin methods. * Ensure that hook_xmlrpc_alter() can hide even builtin methods.
*/ */
protected function testAlterListMethods() { protected function testAlterListMethods() {
global $base_url;
// Ensure xmlrpc_test_xmlrpc_alter() is disabled and retrieve regular list of methods. // Ensure xmlrpc_test_xmlrpc_alter() is disabled and retrieve regular list of methods.
variable_set('xmlrpc_test_xmlrpc_alter', FALSE); variable_set('xmlrpc_test_xmlrpc_alter', FALSE);
$url = $base_url . '/core/xmlrpc.php'; $url = url(NULL, array('absolute' => TRUE)) . 'core/xmlrpc.php';
$methods1 = xmlrpc($url, array('system.listMethods' => array())); $methods1 = xmlrpc($url, array('system.listMethods' => array()));
// Enable the alter hook and retrieve the list of methods again. // Enable the alter hook and retrieve the list of methods again.