}
// since we are building source code for later use, if we are given an object instance,
- // we go out of our way and store a pointer to it in a static class var var...
+ // we go out of our way and store a pointer to it in a static class var...
if (is_array($callable) && is_object($callable[0])) {
self::$objHolder[$newFuncName] = $callable[0];
$innerCode .= "\$obj = PhpXmlRpc\\Wrapper::\$objHolder['$newFuncName'];\n";
return $results;
}
-
}
/**
$this->assertEquals('Michigan', $v->scalarval());
}
+ public function testWrapInexistentMethod()
+ {
+ // make a 'deep client copy' as the original one might have many properties set
+ $func = wrap_xmlrpc_method($this->client, 'examples.getStateName.notexisting', array('simple_client_copy' => 0));
+ $this->assertEquals(false, $func);
+ }
+
+ public function testWrapInexistentUrl()
+ {
+ $this->client->path = '/notexisting';
+ // make a 'deep client copy' as the original one might have many properties set
+ $func = wrap_xmlrpc_method($this->client, 'examples.getStateName', array('simple_client_copy' => 0));
+ $this->assertEquals(false, $func);
+ }
+
public function testServerWrappedClassWithNamespace()
{
$m = new xmlrpcmsg('namespacetest.findState', array(
$unsafeMethods = array(
'testCatchExceptions', 'testUtf8Method', 'testServerComments',
'testExoticCharsetsRequests', 'testExoticCharsetsRequests2', 'testExoticCharsetsRequests3',
+ 'testWrapInexistentUrl',
);
$methods = array();