Example #1
0
function run_easy_tests($server, $debug = 0, $output = null)
{
    global $decl_1, $decl_2, $decl_3, $decl_4;
    run_test($server, $debug, $output, "interopEchoTests.echoString", "That government is best, which governs least");
    run_test($server, $debug, $output, "interopEchoTests.echoBoolean", true);
    run_test($server, $debug, $output, "interopEchoTests.echoInteger", 42);
    run_test($server, $debug, $output, "interopEchoTests.echoFloat", 3.1416);
    run_test($server, $debug, $output, "interopEchoTests.echoStruct", array("varFloat" => 1.2345, "varInt" => 186000, "varString" => "a string"));
    run_test($server, $debug, $output, "interopEchoTests.echoStringArray", array($decl_1, $decl_2, $decl_3, $decl_4));
    run_test($server, $debug, $output, "interopEchoTests.echoIntegerArray", array(23, 234, 1, 0, -10, 999));
    run_test($server, $debug, $output, "interopEchoTests.echoFloatArray", array(2.45, 9.9999));
    run_test($server, $debug, $output, "interopEchoTests.echoStructArray", array(array("varFloat" => 1.2345, "varInt" => 186000, "varString" => "a string"), array("varFloat" => 10.98765, "varInt" => 3200, "varString" => "happy little string")));
    $foo = "some base64 string";
    xmlrpc_set_type(&$foo, "base64");
    run_test($server, $debug, $output, "interopEchoTests.echoBase64", $foo);
    $foo = "19980717T14:08:55";
    xmlrpc_set_type(&$foo, "datetime");
    run_test($server, $debug, $output, "interopEchoTests.echoDate", $foo);
    run_no_param_test($server, $debug, $output, "interopEchoTests.noInParams");
}
Example #2
0
function run_stress_tests($server, $debug = 0, $output = null)
{
    global $wiki_dmap;
    run_no_param_test($server, $debug, $output, "wiki.getRPCVersionSupported");
    // of the last day:
    run_test($server, $debug, $output, "wiki.getRecentChanges", iso8601_encode(time() - 86400, 1));
    /* ... */
}