From: gggeek Date: Sat, 23 May 2015 23:49:08 +0000 (+0100) Subject: Add test for the method signature of wrapped functions X-Git-Tag: 4.0.0-alpha^2~36 X-Git-Url: http://git.onelab.eu/?p=plcapi.git;a=commitdiff_plain;h=be406d63c36f48190a44117158d92cdbc7f72565 Add test for the method signature of wrapped functions --- diff --git a/tests/3LocalhostTest.php b/tests/3LocalhostTest.php index 3675d9d..ec3ba17 100644 --- a/tests/3LocalhostTest.php +++ b/tests/3LocalhostTest.php @@ -569,6 +569,14 @@ And turned it into nylon'; new xmlrpcval(0, 'int'), )); $v = $this->send($f, $GLOBALS['xmlrpcerr']['server_error']); + + // check if the generated function dispatch map is fine, by checking if the server registered it + $f = new xmlrpcmsg('system.methodSignature', array( + new xmlrpcval('tests.getStateName.2'), + )); + $v = $this->send($f); + $encoder = new \PhpXmlRpc\Encoder(); + $this->assertEquals(array(array('string', 'int')), $encoder->decode($v)); } public function testServerWrappedFunctionAsSource()