public function testObjectResponse() { $wsdl = $this->baseuri . "/server2.php?wsdl"; $client = new Client\Client($wsdl); $ret = $client->request("test", "test"); $this->assertTrue($ret instanceof \stdClass); $this->assertEquals("test", $ret->foo); $this->assertEquals("test", $ret->bar); }
/** * Init Soap client - connect to SOAP service * * @param string $endpoint * @throws Zend\Service\LiveDocx\Exception * @return void * @since LiveDocx 1.2 */ protected function _initSoapClient($endpoint) { $this->_soapClient = new Client(); $this->_soapClient->setWSDL($endpoint); }
public function testSetSoapClient() { $clientMock = $this->getMock('SoapClient', array('__setCookie'), array(null, array('uri' => 'http://www.zend.com', 'location' => 'http://www.zend.com'))); $soap = new Client\Client(); $soap->setSoapClient($clientMock); $this->assertSame($clientMock, $soap->getSoapClient()); }