You are here

protected function XmlRpcTestBase::verboseResult in xmlrpc 8

Provides detailed response information if verbose is enabled.

Parameters

mixed $result: A XML-RPC result.

2 calls to XmlRpcTestBase::verboseResult()
XmlRpcBasicTest::testInvalidServer in src/Tests/XmlRpcBasicTest.php
Addresses bug https://www.drupal.org/node/2146833 .
XmlRpcTestBase::xmlRpcGet in src/Tests/XmlRpcTestBase.php
Invokes xmlrpc method.

File

src/Tests/XmlRpcTestBase.php, line 25

Class

XmlRpcTestBase
A base class simplifying xmlrpc() calls testing.

Namespace

Drupal\xmlrpc\Tests

Code

protected function verboseResult($result) {
  if ($result === FALSE) {
    $this
      ->verbose(new FormattableMarkup('Result: <pre>@result</pre><br />Errno: @errno<br />Message: @message', [
      '@result' => var_export($result, TRUE),
      '@errno' => xmlrpc_errno(),
      '@message' => xmlrpc_error_msg(),
    ]));
  }
  else {
    $this
      ->verbose('<pre>' . var_export($result, TRUE) . '</pre>');
  }
}