X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=test%2Ftestsuite.php;h=2918de890f2e78bdfc91198317a397937b72de18;hb=56e14c3455c84036aadc1a4ab0fa38494fc8adcf;hp=5784be4dddba9fff6093d57cdd6501a60acff991;hpb=9a9948d7a401788e68b6ae35fdf3e567bb5ababf;p=plcapi.git diff --git a/test/testsuite.php b/test/testsuite.php index 5784be4..2918de8 100644 --- a/test/testsuite.php +++ b/test/testsuite.php @@ -1241,6 +1241,21 @@ $f = 'parseresponse($s); $v = $r->value(); $this->assertequals('null', $v->scalartyp()); + // test with the apache version: EX:NIL + $GLOBALS['xmlrpc_null_apache_encoding'] = true; + // serialization + $v = new xmlrpcval('hello', 'null'); + $s = $v->serialize(); + $this->assertequals(1, preg_match( '##', $s )); + // deserialization + $r = new xmlrpcresp($v); + $s = $r->serialize(); + $r = $m->parseresponse($s); + $v = $r->value(); + $this->assertequals('null', $v->scalartyp()); + $GLOBALS['xmlrpc_null_extension'] = false; + $r = $m->parseresponse($s); + $this->assertequals(2, $r->faultCode()); } function TestLocale()