Annotation of embedaddon/php/ext/xmlrpc/tests/001.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: xmlrpc_encode_request() with wrong arguments
! 3: --SKIPIF--
! 4: <?php if (!extension_loaded("xmlrpc")) print "skip"; ?>
! 5: --FILE--
! 6: <?php
! 7:
! 8: var_dump(xmlrpc_encode_request(-1, 1));
! 9: var_dump(xmlrpc_encode_request("", 1));
! 10: var_dump(xmlrpc_encode_request(array(), 1));
! 11: var_dump(xmlrpc_encode_request(3.4, 1));
! 12:
! 13: echo "Done\n";
! 14: ?>
! 15: --EXPECTF--
! 16: string(174) "<?xml version="1.0" encoding="iso-8859-1"?>
! 17: <methodCall>
! 18: <methodName>-1</methodName>
! 19: <params>
! 20: <param>
! 21: <value>
! 22: <int>1</int>
! 23: </value>
! 24: </param>
! 25: </params>
! 26: </methodCall>
! 27: "
! 28: string(160) "<?xml version="1.0" encoding="iso-8859-1"?>
! 29: <methodCall>
! 30: <methodName/>
! 31: <params>
! 32: <param>
! 33: <value>
! 34: <int>1</int>
! 35: </value>
! 36: </param>
! 37: </params>
! 38: </methodCall>
! 39: "
! 40:
! 41: Warning: xmlrpc_encode_request() expects parameter 1 to be string, array given in %s on line %d
! 42: NULL
! 43: string(175) "<?xml version="1.0" encoding="iso-8859-1"?>
! 44: <methodCall>
! 45: <methodName>3.4</methodName>
! 46: <params>
! 47: <param>
! 48: <value>
! 49: <int>1</int>
! 50: </value>
! 51: </param>
! 52: </params>
! 53: </methodCall>
! 54: "
! 55: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>