$desc

"; } echo <<< END

TEST: $title

$desc

Enter your xmlrpc query


encoding

output type
xml php

These options apply to xml output type only.
output version
xmlrpc simple
output verbosity
pretty newlines only no white space
output escaping
markup cdata non-ascii non-print

END; } $test_cases = array( array( title => "custom user input", desc => "Enter your own xml here if you have a specific xmlrpc query you would like to perform.", xml => ""), array( title => "arrayOfStructsTest", desc => "This handler takes a single parameter, an array of structs, each of which contains at least three elements named moe, larry and curly, all s. Your handler must add all the struct elements named curly and return the result.", xml => " validator1.arrayOfStructsTest curly -79 larry 34 moe 19 curly -33 larry 36 moe 40 curly -30 larry 52 moe 1 curly -7 larry 82 moe 35 curly 0 larry 54 moe 82 curly -5 larry 5 moe 66 curly -10 larry 65 moe 53 curly -2 larry 66 moe 43 " ), array( title => "countTheEntities", desc => "This handler takes a single parameter, a string, that contains any number of predefined entities, namely <, >, &, ' and \". Your handler must return a struct that contains five fields, all numbers: ctLeftAngleBrackets, ctRightAngleBrackets, ctAmpersands, ctApostrophes, ctQuotes. To validate, the numbers must be correct", xml => " validator1.countTheEntities b&amp;htj&gt;q&lt;e&gt;ow&lt;&gt;&lt;a&quot;&gt;&quot;&gt;m&amp;&lt;y&gt;&gt;g&lt;&quot;kf&amp;nup&gt;&amp;lsz&amp;lt;xi&amp;d&quot;&lt;&apos;crv&lt; "), array( title => "easyStructTest", desc => "This handler takes a single parameter, a struct, containing at least three elements named moe, larry and curly, all s. Your handler must add the three numbers and return the result.", xml => " validator1.easyStructTest curly -60 larry 22 moe 37 "), array( title => "echoStructTest", desc => "This handler takes a single parameter, a struct. Your handler must return the struct.", xml => " validator1.echoStructTest substruct0 curly -52 larry 55 moe 82 substruct1 curly -59 larry 70 moe 20 substruct2 curly -26 larry 1 moe 4 substruct3 curly -42 larry 73 moe 45 substruct4 curly -48 larry 16 moe 57 substruct5 curly -1 larry 77 moe 100 substruct6 curly -44 larry 2 moe 42 substruct7 curly -84 larry 18 moe 95 substruct8 curly -48 larry 93 moe 80 substruct9 curly -82 larry 58 moe 21 "), array( title => "manyTypesTest", desc => "This handler takes six parameters, and returns an array containing all the parameters.", xml => " validator1.manyTypesTest 24288 0 Texas 1762.0 19040101T05:24:54 R0lGODlhFgASAJEAAP/////OnM7O/wAAACH5BAEAAAAALAAAAAAWABIAAAJAhI+py40zDIzujEDBzW0n74AaFGChqZUYylyYq7ILXJJ1BU95l6r23RrRYhyL5jiJAT/Ink8WTPoqHx31im0UAAA7 "), array( title => "moderateSizeArrayCheck", desc => "This handler takes a single parameter, which is an array containing between 100 and 200 elements. Each of the items is a string, your handler must return a string containing the concatenated text of the first and last elements.", xml => " validator1.moderateSizeArrayCheck Maine Nebraska Nebraska Kansas Tennessee Ohio Oregon Missouri Mississippi Michigan Pennsylvania Rhode Island Iowa Iowa Nebraska Washington Oregon Virginia Arizona Utah South Carolina Montana Tennessee Iowa Maryland Michigan Iowa Wisconsin Delaware Kansas North Dakota Massachusetts New Mexico Alaska Michigan Colorado Wisconsin South Dakota Vermont Virginia Arkansas Wisconsin Colorado Iowa Oregon Arizona Michigan Illinois Virginia Florida South Carolina Florida Arkansas Maryland Rhode Island Washington Georgia Arizona Iowa Louisiana Washington Nevada Alaska Hawaii New Hampshire West Virginia South Carolina Vermont Tennessee Connecticut Maine Louisiana Alaska Maine California Vermont Rhode Island West Virginia Colorado Delaware Massachusetts Rhode Island Nevada Oklahoma Nebraska Ohio Indiana Mississippi Mississippi Washington Tennessee Arkansas Alaska Rhode Island Oklahoma Massachusetts Connecticut Connecticut Virginia Nebraska Alabama Louisiana Colorado Vermont New Hampshire Ohio Nebraska Wisconsin Kansas "), array( title => "nestedStructTest", desc => "This handler takes a single parameter, a struct, that models a daily calendar. At the top level, there is one struct for each year. Each year is broken down into months, and months into days. Most of the days are empty in the struct you receive, but the entry for April 1, 2000 contains a least three elements named moe, larry and curly, all s. Your handler must add the three numbers and return the result.

Ken MacLeod: \"This description isn't clear, I expected '2000.April.1' when in fact it's '2000.04.01'. Adding a note saying that month and day are two-digits with leading 0s, and January is 01 would help.\" Done.", xml => " validator1.nestedStructTest 2000 03 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 04 01 curly -23 larry 96 moe 17 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 "), array( title => "simpleStructReturnTest", desc => "This handler takes one parameter, and returns a struct containing three elements, times10, times100 and times1000, the result of multiplying the number by 10, 100 and 1000.", xml => " validator1.simpleStructReturnTest 55 ") ); foreach($test_cases as $test_case) { do_test_case($test_case[title], $test_case[desc], $test_case[xml]); } ?>