コード例 #1
0
ファイル: ClientTest.php プロジェクト: pnaq57/zf2demo
 /**
  * @group ZF-1797
  */
 public function testSuccesfulRpcMethodCallWithXmlRpcValueParameters()
 {
     $time = time();
     $params = array(new Value\Boolean(true), new Value\Integer(4), new Value\String('foo'));
     $expect = array(true, 4, 'foo');
     $this->setServerResponseTo($expect);
     $result = $this->xmlrpcClient->call('foo.bar', $params);
     $this->assertSame($expect, $result);
     $request = $this->xmlrpcClient->getLastRequest();
     $response = $this->xmlrpcClient->getLastResponse();
     $this->assertSame('foo.bar', $request->getMethod());
     $this->assertSame($params, $request->getParams());
     $this->assertSame($expect, $response->getReturnValue());
     $this->assertFalse($response->isFault());
 }
コード例 #2
0
 /**
  * Format a success response
  *
  * @return string
  */
 public function getResponse()
 {
     $content = 'Response :' . "\n";
     $content .= static::logType($this->client->getLastResponse()->getReturnValue());
     return $content;
 }