Index: . =================================================================== --- . (revision 11689) +++ . (working copy) @@ -22,8 +22,8 @@ function testConstructor() { $wsdl = new Zend_Soap_Wsdl('MyService', 'http://localhost/MyService.php'); - - $this->assertEquals($wsdl->toXml(), + + $this->assertEquals($wsdl->toXml(), '' . PHP_EOL . '' . PHP_EOL); } - + function testAddMessage() { $wsdl = new Zend_Soap_Wsdl('MyService', 'http://localhost/MyService.php'); - + $messageParts = array(); $messageParts['parameter1'] = $wsdl->getType('int'); $messageParts['parameter2'] = $wsdl->getType('string'); @@ -41,10 +41,10 @@ $messageParts['parameter1'] = $wsdl->getType('int'); $messageParts['parameter2'] = $wsdl->getType('string'); $messageParts['parameter3'] = $wsdl->getType('mixed'); - + $wsdl->addMessage('myMessage', $messageParts); - - $this->assertEquals($wsdl->toXml(), + + $this->assertEquals($wsdl->toXml(), '' . PHP_EOL . 'addPortType('myPortType'); - - $this->assertEquals($wsdl->toXml(), + + $this->assertEquals($wsdl->toXml(), '' . PHP_EOL . 'addPortType('myPortType'); - + $wsdl->addPortOperation($portType, 'operation1'); $wsdl->addPortOperation($portType, 'operation2', 'tns:operation2Request', 'tns:operation2Response'); $wsdl->addPortOperation($portType, 'operation3', 'tns:operation3Request', 'tns:operation3Response', 'tns:operation3Fault'); - - $this->assertEquals($wsdl->toXml(), + + $this->assertEquals($wsdl->toXml(), '' . PHP_EOL . '' . '' . PHP_EOL); } - + function testAddBinding() { $wsdl = new Zend_Soap_Wsdl('MyService', 'http://localhost/MyService.php'); - + $wsdl->addPortType('myPortType'); $wsdl->addBinding('MyServiceBinding', 'myPortType'); - $this->assertEquals($wsdl->toXml(), + $this->assertEquals($wsdl->toXml(), '' . PHP_EOL . 'addPortType('myPortType'); $binding = $wsdl->addBinding('MyServiceBinding', 'myPortType'); - + $wsdl->addBindingOperation($binding, 'operation1'); - $wsdl->addBindingOperation($binding, - 'operation2', + $wsdl->addBindingOperation($binding, + 'operation2', array('use' => 'encoded', 'encodingStyle' => "http://schemas.xmlsoap.org/soap/encoding/"), array('use' => 'encoded', 'encodingStyle' => "http://schemas.xmlsoap.org/soap/encoding/") ); - $wsdl->addBindingOperation($binding, - 'operation3', + $wsdl->addBindingOperation($binding, + 'operation3', array('use' => 'encoded', 'encodingStyle' => "http://schemas.xmlsoap.org/soap/encoding/"), array('use' => 'encoded', 'encodingStyle' => "http://schemas.xmlsoap.org/soap/encoding/"), array('use' => 'encoded', 'encodingStyle' => "http://schemas.xmlsoap.org/soap/encoding/") @@ -150,8 +150,8 @@ array('use' => 'encoded', 'encodingStyle' => "http://schemas.xmlsoap.org/soap/encoding/"), array('use' => 'encoded', 'encodingStyle' => "http://schemas.xmlsoap.org/soap/encoding/") ); - - $this->assertEquals($wsdl->toXml(), + + $this->assertEquals($wsdl->toXml(), '' . PHP_EOL . '' . '' . PHP_EOL); } - + function testAddSoapBinding() { $wsdl = new Zend_Soap_Wsdl('MyService', 'http://localhost/MyService.php'); - + $wsdl->addPortType('myPortType'); $binding = $wsdl->addBinding('MyServiceBinding', 'myPortType'); - + $wsdl->addSoapBinding($binding); - + $wsdl->addBindingOperation($binding, 'operation1'); - $wsdl->addBindingOperation($binding, - 'operation2', + $wsdl->addBindingOperation($binding, + 'operation2', array('use' => 'encoded', 'encodingStyle' => "http://schemas.xmlsoap.org/soap/encoding/"), array('use' => 'encoded', 'encodingStyle' => "http://schemas.xmlsoap.org/soap/encoding/") ); - - $this->assertEquals($wsdl->toXml(), + + $this->assertEquals($wsdl->toXml(), '' . PHP_EOL . '' . '' . '' . PHP_EOL); - + $wsdl1 = new Zend_Soap_Wsdl('MyService', 'http://localhost/MyService.php'); - + $wsdl1->addPortType('myPortType'); $binding = $wsdl1->addBinding('MyServiceBinding', 'myPortType'); - + $wsdl1->addSoapBinding($binding, 'rpc'); - + $wsdl1->addBindingOperation($binding, 'operation1'); - $wsdl1->addBindingOperation($binding, - 'operation2', + $wsdl1->addBindingOperation($binding, + 'operation2', array('use' => 'encoded', 'encodingStyle' => "http://schemas.xmlsoap.org/soap/encoding/"), array('use' => 'encoded', 'encodingStyle' => "http://schemas.xmlsoap.org/soap/encoding/") ); - - $this->assertEquals($wsdl1->toXml(), + + $this->assertEquals($wsdl1->toXml(), '' . PHP_EOL . '' . '' . PHP_EOL); } - - + + function testAddSoapOperation() { $wsdl = new Zend_Soap_Wsdl('MyService', 'http://localhost/MyService.php'); - + $wsdl->addPortType('myPortType'); $binding = $wsdl->addBinding('MyServiceBinding', 'myPortType'); @@ -271,15 +271,15 @@ $binding = $wsdl->addBinding('MyServiceBinding', 'myPortType'); $wsdl->addSoapOperation($binding, 'http://localhost/MyService.php#myOperation'); - + $wsdl->addBindingOperation($binding, 'operation1'); - $wsdl->addBindingOperation($binding, - 'operation2', + $wsdl->addBindingOperation($binding, + 'operation2', array('use' => 'encoded', 'encodingStyle' => "http://schemas.xmlsoap.org/soap/encoding/"), array('use' => 'encoded', 'encodingStyle' => "http://schemas.xmlsoap.org/soap/encoding/") ); - - $this->assertEquals($wsdl->toXml(), + + $this->assertEquals($wsdl->toXml(), '' . PHP_EOL . '' . '' . PHP_EOL); } - + function testAddService() { $wsdl = new Zend_Soap_Wsdl('MyService', 'http://localhost/MyService.php'); - + $wsdl->addPortType('myPortType'); $wsdl->addBinding('MyServiceBinding', 'myPortType'); - + $wsdl->addService('Service1', 'myPortType', 'MyServiceBinding', 'http://localhost/MyService.php'); - - $this->assertEquals($wsdl->toXml(), + + $this->assertEquals($wsdl->toXml(), '' . PHP_EOL . 'addPortType('myPortType'); - + $wsdl->addDocumentation($portType, 'This is a description for Port Type node.'); - - $this->assertEquals($wsdl->toXml(), + + $this->assertEquals($wsdl->toXml(), '' . PHP_EOL . 'assertEquals($wsdl->toXml(), + + $this->assertEquals($wsdl->toXml(), '' . PHP_EOL . 'toDomDocument(); - + $this->assertTrue($dom instanceOf DOMDocument); - - $this->assertEquals($dom->saveXML(), + + $this->assertEquals($dom->saveXML(), '' . PHP_EOL . '' . PHP_EOL); } - + function testDump() { $wsdl = new Zend_Soap_Wsdl('MyService', 'http://localhost/MyService.php'); - + ob_start(); $wsdl->dump(); $wsdlDump = ob_get_contents(); @@ -391,8 +391,8 @@ $wsdl->dump(); $wsdlDump = ob_get_contents(); ob_end_clean(); - - $this->assertEquals($wsdlDump, + + $this->assertEquals($wsdlDump, '' . PHP_EOL . 'dump(dirname(__FILE__) . '/_files/dumped.wsdl'); $dumpedContent = file_get_contents(dirname(__FILE__) . '/_files/dumped.wsdl'); - - $this->assertEquals($dumpedContent, + + $this->assertEquals($dumpedContent, '' . PHP_EOL . '' . PHP_EOL); - + unlink(dirname(__FILE__) . '/_files/dumped.wsdl'); } - + function testGetType() { $wsdl = new Zend_Soap_Wsdl('MyService', 'http://localhost/MyService.php'); @@ -435,20 +435,20 @@ $this->assertEquals($wsdl->getType('Zend_Soap_Wsdl_Test'), 'tns:Zend_Soap_Wsdl_Test'); - + $wsdl1 = new Zend_Soap_Wsdl('MyService', 'http://localhost/MyService.php', false); - + $this->assertEquals($wsdl1->getType('Zend_Soap_Wsdl_Test'), 'xsd:anyType'); - + } - + function testAddComplexType() { $wsdl = new Zend_Soap_Wsdl('MyService', 'http://localhost/MyService.php'); - + $wsdl->addComplexType('Zend_Soap_Wsdl_Test'); - - $this->assertEquals($wsdl->toXml(), + + $this->assertEquals($wsdl->toXml(), '' . PHP_EOL . '' . '' - . '' + . '' . '' . '' . '' @@ -480,7 +480,7 @@ * @var integer */ public $var1; - + /** * @var string */