\n"; } $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'http://', 'port' => 80, 'proxy' => '', 'proxy_protocol' => 'http://', 'proxy_port' => 8080, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'theserver'); compare($x, $c, 'defaults'); $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'http://', 'port' => 80, 'proxy' => '', 'proxy_protocol' => 'http://', 'proxy_port' => 8080, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'http://theserver'); compare($x, $c, 'defaults with http'); $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'ssl://', 'port' => 443, 'proxy' => '', 'proxy_protocol' => 'http://', 'proxy_port' => 8080, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'https://theserver'); compare($x, $c, 'defaults with https'); $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'ssl://', 'port' => 443, 'proxy' => '', 'proxy_protocol' => 'http://', 'proxy_port' => 8080, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'ssl://theserver'); compare($x, $c, 'defaults with ssl'); $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'http://', 'port' => 65, 'proxy' => '', 'proxy_protocol' => 'http://', 'proxy_port' => 8080, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'theserver', 65); compare($x, $c, 'port 65'); $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'http://', 'port' => 65, 'proxy' => '', 'proxy_protocol' => 'http://', 'proxy_port' => 8080, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'http://theserver', 65); compare($x, $c, 'port 65 with http'); $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'ssl://', 'port' => 65, 'proxy' => '', 'proxy_protocol' => 'http://', 'proxy_port' => 8080, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'https://theserver', 65); compare($x, $c, 'port 65 with https'); $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'ssl://', 'port' => 65, 'proxy' => '', 'proxy_protocol' => 'http://', 'proxy_port' => 8080, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'ssl://theserver', 65); compare($x, $c, 'port 65 with ssl'); $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'http://', 'port' => 80, 'proxy' => 'theproxy', 'proxy_protocol' => 'http://', 'proxy_port' => 8080, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'theserver', 0, 'theproxy'); compare($x, $c, 'defaults proxy'); $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'http://', 'port' => 80, 'proxy' => 'theproxy', 'proxy_protocol' => 'http://', 'proxy_port' => 8080, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'http://theserver', 0, 'http://theproxy'); compare($x, $c, 'defaults with http proxy'); $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'ssl://', 'port' => 443, 'proxy' => 'theproxy', 'proxy_protocol' => 'ssl://', 'proxy_port' => 443, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'https://theserver', 0, 'https://theproxy'); compare($x, $c, 'defaults with https proxy'); $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'ssl://', 'port' => 443, 'proxy' => 'theproxy', 'proxy_protocol' => 'ssl://', 'proxy_port' => 443, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'ssl://theserver', 0, 'ssl://theproxy'); compare($x, $c, 'defaults with ssl proxy'); $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'http://', 'port' => 65, 'proxy' => 'theproxy', 'proxy_protocol' => 'http://', 'proxy_port' => 6565, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'theserver', 65, 'theproxy', 6565); compare($x, $c, 'port 65 proxy 6565'); $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'http://', 'port' => 65, 'proxy' => 'theproxy', 'proxy_protocol' => 'http://', 'proxy_port' => 6565, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'http://theserver', 65, 'http://theproxy', 6565); compare($x, $c, 'port 65 with http proxy 6565'); $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'ssl://', 'port' => 65, 'proxy' => 'theproxy', 'proxy_protocol' => 'ssl://', 'proxy_port' => 6565, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'https://theserver', 65, 'https://theproxy', 6565); compare($x, $c, 'port 65 with https proxy 6565'); $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'ssl://', 'port' => 65, 'proxy' => 'theproxy', 'proxy_protocol' => 'ssl://', 'proxy_port' => 6565, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'ssl://theserver', 65, 'ssl://theproxy', 6565); compare($x, $c, 'port 65 with ssl proxy 6565'); $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'ssl://', 'port' => 443, 'proxy' => 'theproxy', 'proxy_protocol' => 'ssl://', 'proxy_port' => 443, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'theserver', 443, 'theproxy', 443); compare($x, $c, 'port 443 no protocol and proxy port 443 no protocol'); $x = array( 'path' => 'thepath', 'server' => 'theserver', 'protocol' => 'http://', 'port' => 80, 'proxy' => 'theproxy', 'proxy_protocol' => 'ssl://', 'proxy_port' => 6565, 'proxy_user' => '', 'proxy_pass' => '', 'errno' => 0, 'errstring' => '', 'debug' => 0, 'username' => '', 'password' => '', ); $c = new XML_RPC_Client('thepath', 'theserver', 0, 'ssl://theproxy', 6565); compare($x, $c, 'port 443 no protocol and proxy port 443 no protocol'); echo "\nIf no other output was produced, these tests passed.\n";