Fxmlrpc\Client::appendParams PHP Method

appendParams() public method

Append default parameters that should always be prepended
public appendParams ( array $params )
$params array
    public function appendParams(array $params)
    {
        $this->appendParams = $params;
    }

Usage Example

 public function testAppendingParams()
 {
     $this->serializer->expects($this->once())->method('serialize')->with('methodName', array('p0', 'p1', 'p2', 'p3'))->will($this->returnValue('REQUEST'));
     $this->mockTransport('http://foo.com', 'REQUEST', 'RESPONSE');
     $this->parser->expects($this->once())->method('parse')->with('RESPONSE')->will($this->returnValue('NATIVE VALUE'));
     $this->assertSame(array(), $this->client->getAppendParams());
     $this->client->appendParams(array('p2', 'p3'));
     $this->assertSame(array('p2', 'p3'), $this->client->getAppendParams());
     $this->assertSame('NATIVE VALUE', $this->client->call('methodName', array('p0', 'p1')));
 }