Exemplo n.º 1
0
 public function testAddDocumentationToSetInsertsBefore()
 {
     $wsdl = new Wsdl('MyService', 'http://localhost/MyService.php');
     $messageParts = array();
     $messageParts['parameter1'] = $wsdl->getType('int');
     $messageParts['parameter2'] = $wsdl->getType('string');
     $messageParts['parameter3'] = $wsdl->getType('mixed');
     $message = $wsdl->addMessage('myMessage', $messageParts);
     $wsdl->addDocumentation($message, "foo");
     $this->assertEquals('<?xml version="1.0"?>' . '<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" ' . 'xmlns:tns="http://localhost/MyService.php" ' . 'xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" ' . 'xmlns:xsd="http://www.w3.org/2001/XMLSchema" ' . 'xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" ' . 'xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" ' . 'name="MyService" targetNamespace="http://localhost/MyService.php">' . '<message name="myMessage">' . '<documentation>foo</documentation>' . '<part name="parameter1" type="xsd:int"/>' . '<part name="parameter2" type="xsd:string"/>' . '<part name="parameter3" type="xsd:anyType"/>' . '</message>' . '</definitions>', $this->sanitizeWsdlXmlOutputForOsCompability($wsdl->toXml()));
 }