You are here

function XMLRPCMessagesTestCase::testSizedMessages in SimpleTest 7

Make sure that XML-RPC can transfer large messages.

File

tests/xmlrpc.test, line 139

Class

XMLRPCMessagesTestCase

Code

function testSizedMessages() {
  $xml_url = url(NULL, array(
    'absolute' => TRUE,
  )) . 'xmlrpc.php';
  $sizes = array(
    8,
    80,
    160,
  );
  foreach ($sizes as $size) {
    $xml_message_l = xmlrpc_test_message_sized_in_kb($size);
    $xml_message_r = xmlrpc($xml_url, 'messages.messageSizedInKB', $size);
    $this
      ->assertEqual($xml_message_l, $xml_message_r, t('XML-RPC messages.messageSizedInKB of %s Kb size received', array(
      '%s' => $size,
    )));
  }
}