+ public function testWrappedMethodAsSource()
+ {
+ // 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, 'return_source' => true));
+ if ($func == false) {
+ $this->fail('Registration of examples.getStateName failed');
+ } else {
+ eval($func['source']);
+ $func = $func['function'];
+ $v = $func(23);
+ // work around bug in current version of phpunit
+ if (is_object($v)) {
+ $v = var_export($v, true);
+ }
+ $this->assertEquals('Michigan', $v);
+ }
+ }
+