* @license MIT * * @group Coverage */ class XmlRpcTest extends PHPUnit_Framework_TestCase { /** * {@inheritDoc} * * @covers \ProxyManager\Factory\RemoteObject\Adapter\XmlRpc::__construct * @covers \ProxyManager\Factory\RemoteObject\Adapter\XmlRpc::getServiceName */ public function testCanBuildAdapterWithXmlRpcClient() { $client = $this ->getMockBuilder('Zend\Server\Client') ->setMethods(array('call')) ->getMock(); $adapter = new XmlRpc($client); $client ->expects($this->once()) ->method('call') ->with('foo.bar', array('tab' => 'taz')) ->will($this->returnValue('baz')); $this->assertSame('baz', $adapter->call('foo', 'bar', array('tab' => 'taz'))); } }