You are here

public function XmlRpcMessagesTest::testSizedMessages in xmlrpc 8

Make sure that XML-RPC can transfer large messages.

File

src/Tests/XmlRpcMessagesTest.php, line 34

Class

XmlRpcMessagesTest
Tests large messages and method alterations.

Namespace

Drupal\xmlrpc\Tests

Code

public function testSizedMessages() {
  $sizes = [
    8,
    80,
    160,
  ];
  foreach ($sizes as $size) {
    $xml_message_l = xmlrpc_test_message_sized_in_kb($size);
    $xml_message_r = $this
      ->xmlRpcGet([
      'messages.messageSizedInKB' => [
        $size,
      ],
    ]);
    $this
      ->assertEqual($xml_message_l, $xml_message_r, new FormattableMarkup('XML-RPC messages.messageSizedInKB of %s Kb size received', [
      '%s' => $size,
    ]));
  }
}